3 Steps To Backup and Restore your WordPress Site

backup -estore-wordpress-site

Your WordPress website, whether it is used for business or pleasure, is likely chock full of years of content goodness; hundreds of posts, media, or custom content types –all properly formatted, edited, and thoughtfully produced.

But what if a malicious hacker, bot, or even a glitch at your WordPress website hosting company pushed your website into non-existence? In the time it takes to read this sentence, your website can simply vanish from the interwebs. And without a backup preserved locally or in the cloud, all those hours producing your content are wasted.

Quality Content is an asset, and a fragile one at that. Redundancies are everything, and with this in mind we thought we’d help our readers make a backup of their WordPress website today.

How to Backup and Restore Your WordPress Website in X Steps

Whether your website has been around for three weeks or 10 years –it’s incredibly important to back it up regularly. Depending on your content posting habits, this should probably be done daily, or weekly to ensure that you never lose precious content, comments, and so on.

Keep in mind that your WordPress backup will consist of data that will be organized in two ways; your database (where all of your written posts and other website data are stored) –and your website files. The database sort of works like a table of contents, or a spine, that holds all those files together.

How to Backup WordPress Files Individually

Core WordPress files contain actionable website functions, and those files are all located in a number of different folders. While you can do a complete backup with a third party script such as Softaculous, you can also backup files and folders individually for more control. This will allow you to save some time when you restore WordPress manually, as you can merge your individual files and database with a fresh WordPress install on your host server. If you have a slow upload speed, this will help you forgo the upload of standard, non-custom files and folders. Of course, a full WordPress folder backup might be ideal for those with faster internet connections.

Some folders you need to backup for a proper WordPress installation restore;

  • WP-CONTENT: WordPress plugins, media files, and themes are stored in your “wp-content” folder, so this is a folder you’ll definitely need to save in your WordPress backup.
  • WP-CONFIG.PHP: The wp-config.php file contains necessary information about your unique database file and your restore will not work without your original file –not the one that comes with a fresh WordPress install.

How to Backup your WordPress Database

Your WordPress website database consists of a number of tables which are stored as individual files on your host server. These files begin with the wp_ prefix, and each file is labelled to clearly inform you as to which information it contains. Without these files, none of your wp_content folder contents will be properly distributed throughout your restored website.

So for example;

  • wp_comments contain all of your website comments
  • wp_posts contain all of your WordPress posts
  • wp_users contain all your WordPress CMS user information

In order to properly backup your WordPress database, we recommend using phpMyAdmin, which is a web based application that is usually available in your server control panel.

After logging in to phpMyAdmin, head over to the “export” tab, where you will be greeted with two choices;

  • Quick – display only minimal options
  • Custom – display all possible options

If you’ve only got a small number of posts and your website is pretty fresh and new, the first option will likely suffice. If you’ve got posts in the double or triple digits then you’ll be better served with the custom option. This is because the file generated by the quick method will come out too large under the quick option if you have many posts, etc.

The custom option will allow you to view your tables in a list and you can pick and choose the ones you’d like to export. Select all of the tables you think are necessary (export them all if you’re unsure) and export them.

Your export will begin with a question; which format do you want them in? We suggest downloading your database tables as SQL files and leave the rest of the available options to their default setting.

Once you’ve selected your custom settings (if any), just tap on “Go” and let phpMyAdmin do it’s thing. And that’s how you back up WordPress.

How to Restore a WordPress Backup

Restoring a WordPress website is a four-part process; install a fresh WordPress installation, then replace the generic configuration files it contains with your own, then add your media files, and finally, your database files.

  • Install a fresh WordPress installation with an app like Softaculous, located within your control panel
  • Find wp-config.php or wp-config-sample.php and replace it with your own
  • Find the wp_content folder and replace it with you own

In order to restore your database backup files, hop back into phpMyAdmin and tap on the import tab. Once there, simply select “browse” and locate your database files for upload. These files will be in SQL format, either contained within a tarball or a zipped file or on their own.

In Summary

Backing up your WordPress installation won’t protect your website from hackers, however it will certainly help clean up a mess caused by one.

Have any thoughts or suggestions to add? Let us know in the comments.

About Richie Contartesi

Richie Contartesi is an online enthusiast with experience building a revenue generating online presence for businesses yielding a maximum return on their time and investment.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Call Now Button