WordPress is easily one of the most popular website builders out there, and in fact, around 455 million websites use WordPress in some form or another. This essentially accounts for roughly 40% of all websites, which is just a truly staggering figure to comprehend.
Of course, not everybody runs their own WordPress site, and most people use some form of a web host. While the majority of web hosts tend to be quite good, you’ll definitely want to consider backing up your WordPress site, just in case of a catastrophic failure.
Laying The Groundwork
Before we get started, it’s important to note that this is somewhat of a technical process, and having some technical skills would be very useful.
When it comes to the backup, there are actually two things that you need to backup:
- The Files: these tend to constitute things such as images, videos, scripts, themes, plugins, and basically function as the main content of your website
- The Database: usually a MySQL database, this stores the actual blog posts, comments, and settings of your WordPress site.
Since we have two different sets of files to back up, the best thing to do is to create a main backup folder titled ”WordPress Backup” or something to that effect, and then two sub-folders titled “files” and “database”. Doing it this way will make sure you don’t mix the files incorrectly and cause an issue with restoring down the line.
Also, backups are generally a prerequisite step to migrate WordPress to a new server or host.
Backup Your WordPress Files
Once you have your backup folders in place, the first thing we’ll need to backup is the files.
Doing a backup through cPanel is probably the easiest way to do the backup, so let’s start with this one.
The first thing you need to do is log in to your account and navigate to your cPanel. Once there, access the File Manager, and look for your WordPress directory, which will usually be under a Home’ or ‘public_html’ path.
Next, you’ll need to download it and to do that, you’ll have to compress it. Thankfully, the process is relatively simple as you can just right-click on the directory and choose ‘Compress’. If you don’t find that option in the drop-down menu, then you’ll certainly find it in the top bar menu, so look around!
At this point, you’ll have to choose the compression type, which will depend on what compression software you use, and then click on ‘Compress File(s)’ to put them through the compressor. Once it’s done, you’ll have created a new file, known as an archive. You just need to download that and you’re done!
This one is a bit more complicated and will require the use of file managing software like FileZilla. Once you install them on your computer, you’ll be able to create a secure tunnel between your machine and the server so that you can download the files directly.
After installing, open up the application and create a new server connection. This will include entering your server’s information, such as host name and port number. Usually, this information is provided by the server host and you can find that info through the cPanel.
After you’ve entered the information and started the session, you should immediately see all your WordPress files, but if not, then navigate to the WordPress folder like in the section above.
Once there, select all the items, right-click, and choose ‘download selected items’ or ‘download’, depending on which SFTP file manager you use. A new window will pop up asking you where you want to download the files, so direct them to the ‘Files’ sub-folder you created earlier and click download and that’s pretty much it.
Backup Your WordPress Database
Now that we have your files backed up, let us move to the database itself.
For this, you’ll have to find phpMyAdmin which can vary where it is depending on the host. If you’re using a cPanel, it should be under ‘Database tools’, but you may also just find it in the dashboard of the cPanel.
After you find it, log in and select the ‘Database’ tab which will show you all your databases. If you aren’t sure which database you are using because you used a third-party tool to install it, there’s actually an easy way to find out.
Load up the file manager from the step above, log in to your server, and then find the wp-config.php file. Open it up by right-clicking on it and picking ‘view’ and try looking for something that looks like this:
The name for your database will be the second name in the brackets, so once you have that information, go back to phpMyAdmin and look for that database name, and open it. After you do, several new files will pop up, these will all be tables for your database.
You’ll now want to select all these tables, either by shift-clicking on the first and last one or if there’s a ‘Check all’ box at the top. Then, click on the ‘export’ tab which will allow you to choose the export settings, and in this case, that means setting the export format to ‘SQL’.
Finally, click ‘Go’ or ‘Export’, which even one start’s the process, wait for the download to finish, and you’re done! At that point, you’ll want to transfer the files to the Database subfolder you made earlier if you haven’t saved them directly there.
If you want to prefer an automatic solution to create a full WordPress backup,
try out WP STAGING | PRO