In this tutorial, we will go over 2 complete ways to backup your WordPress website, the key elements that you should back up and how to manually backup your site in addition how to automate a backup. There are two parts to backing up your WordPress site: Database and Files. You need to back up both the entire site, and you need to back up your WordPress database. Your WordPress database contains everything in your site. Posts, Comments and every link you have on your blog. If your database gets erased, corrupted or hacked, you might lose everything you have written and designed. There are many reasons why this could happen beyond your control. With a dynamic comprehensive backup of your WordPress database and files, you can quickly restore things back to the way it was. Site backups are critical because problems do occur and you need to be prepeared to take action when disaster happens.
- Schedule complete automatic backups of your WordPress sites with Backwpup plugin.
- Backup WordPress manually
Key Elements that you should backup
- SQL Database and all the elements of the WordPress install (Wp-admin, Wp-Content, Wp-Includes, Wp-config files etc)
- Content (Pages, Posts, Comments, Photos, and Videos etc.) via .XML file.
- Custom theme settings .ZIP (Fonts, font sizes, custom CSS, default page layouts, etc.)
- SEO plugin configurations .ZIP (Meta titles, meta descriptions, permalink structure etc.)
How to Backup WordPress Manually
To start you can either backup your site on your hard disc or onto an external drive. Having your backup on an external drive is the safest method . Start by creating a folder on your desktop or your choice of location, right click and create new folder. Rename that folder to something like “completebakup” or add a date to it. Keep it simple so that you can identify it easily. * Understand that a backup is a fail safe, you may have made changes since the last complete backup update your backup every month or so for good measure, both manually and automatically. Regardless if the restoration point is outdated it is far better to have a starting point than losing everything and starting from scratch.
Ok let us review the basics of how WordPress is stored on your hosts database, what to backup and how to do it.
WordPress is a based two key elements:
- PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language.
- MySQL is an open-source database management system.
As for your WordPress install and core functions you need to backup all the .PHP files and MYSQL database to have a full copy of the functional elements of your site. Note this does not include all the pages, posts, comments, media library,template and seo settings these are stored in an XML file your media is however stored in an “uploads folder in your database as well but this redundancy doesn’t really matter for rebuilding your media library. All the nuisances and details will be covered in the next section.
How to backup your .PHP and SQL files manually
The easiest way to copy your .PHP and SQL files is via a free program such as Filezilla. To do this you simply setup your FTP credentials and login into your FTP program then select the entire root menu (The one with all the folders Wp-Content, Wp-includes WP-admin and all the .php files as well as sitemaps and google auths.).
- Copy everything to your backup folder that you created either desktop, documents or external hard drive.
- Make sure that you save all the files and folders in the directory that WordPress is installed on such as (public html if that is the main application for your site or “yoursitename”).
Note: Just in case you have multiple MySQL databases and you wonder which one your site is using, you can open the wp-config.php file in the WordPress root folder with notepad and you will see the database name saved next to the DB_NAME option in the settings section when you set up your WordPress site.
This will take some time, as there are usually thousands of files so go and make yourself a cup of coffee or tea in the meantime.
Now that your core files next is your content, theme settings and SEO settings.
How to back up theme settings, content and SEO settings
This section is extremely important and probably the most overlooked method of a backup. In the past when I first started with WordPress, I was under the impression that backing up the database was enough; little did I know that it did not contain my content, theme settings, and SEO settings upon restoration of a site the only elements that where restored were the core theme and all the plugins. This may not be the traditional method of other WordPress professionals but I find this technique works every time without fail.
Backing up your content, media library, post, pages, slider, portfolios, testimonials
Step 1 Backing up your content (Posts, Comments, Pages, Media Library) Log into your WordPress admin Dashboard go to the “Tools” section click export Step 2 Click Export Step 3-4 Export all your contents
You will then get this ..
Save to your predetermined folder and continue if applicable
Backing up your SEO settings
Here you will save all the configurations of the permalink structure, advanced settings, title structure and meta structres such as %%site%%-%%page%%. If you need to restore the files this will revert all the SEO settings.
Step 5 Step 6
You will then get this ..
Rename to SEO settings save to your predetermined folder and continue
Backing up your custom theme
proceed if applicable if you dont have a custom theme then you have finished the manual download
If you have a custom template then you need to save the settings of that template. These contain the custom CSS rules of your site, default page layouts, show and hide titles, fonts, logo, menu and site description positions. step 7 Locate your custom theme name if you have a child theme then it will be your branded name. Step 8 On your custom theme admin panel you will have a transfer menu. Each template has a different admin panel so the following is just a demonstration. Click export…
You will then get this ..
Now Rename that file to theme settings and place in backup folder and done
Now you should have 4 files in your backup folder
- Your database SQL and .PHP files
- Your Content .XML files
- Your SEO settings .ZIP file
- Your custom template settings file .ZIP
You now have a complete backup of your site and everything you need for restoration keep those files safe they will save you quite a bit of stress and time in the future. The next section of backups will cover how to automatically backup your site and have it stored in your database, drop box, or sent by email. Note that doing an automatic backup does not backup your SEO settings or custom theme settings just your database and content XML file you must do it manually.
How to Automate a Backup
I have tried many plugins on my clients websites for automated backups surprisingly only one of them actually was fully comprehensive. The rest just executed a database backup of the PHP and SQL files much like you get with your host. After surfing the web I found the one and only plugin that did it all from PHP to .XML , Backwpup and its free. I install it for every client in my organic web designs. Although it has its quirks, it is the most comprehensive automated backup plugin available.
Automated backups using the Backwpup plugin
One you enter the admin area of Backwpup there is a straight forward step by step guide to run an automated backup, here we will skip to step two on the list unless you have any installation issues start with step 1. Step 1 Create a Job Name your job something you can remember either with a date or complete backup etc its up to you. Step 2 Tick every option of files to backup Step 3 Here you can choose what type of archive you want for the files. If you have a mac choose a compatible file type. If you would like more detailed information on archiving and file types you can reference this great article by our friends at lifehacker.com http://lifehacker.com/5772385/whats-the-best-way-to-compress-a-bunch-of-files. Step 4 Choose the destination of your archive backup this is one of the great feature of backwpup you have many options. Step 5 Enter the email address of where to send the archive if you choose to email it. Step 6 Run the backup job If you get an error like this….dont worry your backup is still available for download In the backwpup section of your admin you can find all your backup in “logs” here you can download and save all your backups to your PC or external drive for future use. Whatever your method is manual of automatic having a dynamic backup can help you with all kinds of problems that can happen with a wordpress site from hacking, security, or just simple mistakes.