Today's blogging tips post is on "How to create a manual backup of your WordPress site". My recent post on self-hosted server migration tips had a mention of the many tasks that comes with moving to a self-hosted server. One of the very crucial and important ones is managing the backup of your WordPress site.
Why create a manual backup and how is it useful?
Having a backup increases your web security and gives you peace of mind that all your hard work is safe from hackers. There is always an option of reverting back to a working version of the backed up files even in case of accidental deletion or corruption from plugin installation or incompatibility. It is therefore wise to have a backup periodically when any changes are made and especially before a new version of WordPress or plugin is installed or upgraded.
Thankfully there are many free and paid plugins that offer backup and security and work well for many. The popular ones in no particular order are Backupbuddy, UpdraftPlus, Vaultpress (with JetPack), BackWpUp, BackUpWordpress, WP-DB-Backup, Duplicator.To decide on which plugin best works for you, check for the following factors:
- the ability to automate backups
- the ability for partial or full backups
- frequency of backups
- location of data storage
- ease of restoration
There is also the manual process of backing up your WordPress site which is fairly simple. This may not be the best or the most economical way, but works and is definitely a good learning process.There is also a sense of being in control of what you are doing.This full manual backup mainlyΒ involves two steps:
- Backing up your WordPress files and folders.
- Backing up your My-SQL database.
To backup WordPress files and folders :
- Login to your hosting account (Siteground in my case) and navigate to My accounts and cPanel.
- Scroll down to the Files section and find the folder File Manager and double click to open it.
- From the pop-up, click on the radio button "Document root for" , the root directory (public_html) opens up with all the files and folders.
- Select all the files in the root directory by highlighting them and click on the Compress button on the top menu.
- Choose Zip as the compression and choose the destination as the same location. You can rename the zip to a format like mmddyy-sitebackup.zip for easy reference later.
- This may take a while to be created. Once done, download by highlighting on the zip and clicking on the Download button on the top menu. Alternatively, you can use an FTP client like Filezilla to transfer the files to your local machine.
- Once the file is downloaded locally and saved, do remember to delete it from the location it is created using cPanel to save space and also for security reasons.
- Keep this file in a secure place or in multiple locations like google drive or dropbox.
To backup My-SQL database :
- From the cPanel find the PHPMyAdmin folder and click on it.
- An interface pops up with a list of databases.
- Select your database.If you are not sure of your database name, you can figure from the wp-config.php file found in the root directory.Β There should be an entry in the file with lineΒ define('DB_NAME', 'database_name_here');
- Click on the database and check all, check on the Quick-display for export method option in the radio button,Β choose SQL for the format, and click on the Export tab in the top menu. Click on the go button.
- A SQL file is downloaded to your desktop.
- Keep this file in a secure place or in multiple locations like google drive, Dropbox.
I found this video from WPlearningLab.comΒ very useful. It shows step by step instructions on how to manually backup your WordPress site usingΒ Hostgator. However it should be similar for any web hosting site.
How to Restore your backup ?You can restore your website from theΒ two files that you previously backed up
- Log into your hosting cPanel account and navigate to Files and File manager.
- Open the document root eg. public_html.
- Delete any content there.
- FTP or copy the wordpress file that you backed up first .
- Highlight the file and click on Extract.
- From the cPanel go toΒ PHPMyAdmin app and locate your database.
- Delete all the files under it.
- Click on Import tab on the top menu . Click on the browse button to find your sql file that you backed up.
- Click on open and click on the Go button, the database is restored.
- Reload your site and all the contents should be back up !
This video has details of how to restore your wordpress site from backed up site.
If you are not in favor of manual backups there are other options:
- Installing Plugins may be an easier option. Once they are set up and scheduled, it is an automated process and you do not have to do anything manually to backup. However, restoration may have to be done manually.
- Most web hosting companies for eg. Siteground also save regular backups. They will restore the backup for a fee.
Β
Have a great day!
Featured Image: credits PhotoMIX Ltd. from pexels.com, Photoshop CS6
Smitha
Thanks a bunch for this informative post Nisha !
InspiresNish
Thank you so much Smitha !
Raj
Great post Nisha once again. Yes, backup is of the most important thing one must be aware of while being on the self-hosted site. I depend only on automated backup. btw, every time I post a comment on your post I have to enter my name, email and address. It's happening only on your site. I wonder why it doesn't it remembers the jetpack accounts? Do you have the same problem when you comment on mine?
InspiresNish
Thank you Raj , yes indeed automated backup saves a lot of time . Restoration however is mostly manual. I am using the WP GDPR compliance plugin for the comments form to be GDPR compliant and to get the checkbox with the text displayed as it is now with privacy policy. This plugin requires the Jetpack (discussion) comments to be disabled. Found a related thread on this https://wordpress.org/support/topic/i-dont-get-the-gdpr-comment-checkbox/.
Richa
Another super informative post by you! Great tips and tricks!βοΈπβ€
InspiresNish
Thanks a lot Richa!
Megala
Wonderful share ! I have been using the site tool Export for exporting all the contents to a zip file, is this not enough?
InspiresNish
Great question Megala, I used to also use this option on the free wordpress platform before I moved to the hosted server . It is a good alternative option to backup website files and database but some exception. Here is what I found from the link below "WP exports do not export your theme, plugins, and other important website files." https://skillcrush.com/2015/04/23/backing-up-wordpress/ ( Please check under ALTERNATIVE METHODS section). Thank you so much for raising this .
Jyo
Thanks for the awesome info Nisha...this is definitely very useful to me...thanks againπ
InspiresNish
You are very welcome Jyo .I am so glad it is useful to you .Many Thanks!
dietitian mom
Thanks for sharing this helpful post! π
InspiresNish
You are very welcome Anna! Thank you for the comments.
Ron
Excellent information. Thank you. π
InspiresNish
Thank you so much , appreciate your comment and stopping by!
https://www.woodworkingnetwork.com/users/cheryldungan
Simply want to say your article is as astounding. The clearness on your submit is just
nice and that i could think you are knowledgeable in this subject.
Well with your permission let me to grab your feed to keep updated with approaching post.
Thank you a million and please continue the gratifying work.
InspiresNish
Many Thanks for your feedback, truly appreciate it . It gives me so much encouragement and the motivation to try and do even better.