Update: I recommend using ManageWP to easily backup/restore/migrate your WordPress sites.
WordPress is modular but yet very coherent in nature and doing a full backup is not difficult when you know what that you need to backup.
WordPress site consists of several components:
- WordPress code (which you can always get from WordPress.org - or you can use Fantastico/CPanel WP installation)
- wp-config.php (this file holds your database connection information, it is automatically created if you use Fantastico)
- .htaccess (in most cases you can regenerate it from WordPress admin)
- wp-content folder (contains your images, attachments, themes and plugins)
- Database (contains WordPress settings and posts)
Basically since you can always get WordPress code you just need to backup remaining four things.
You can even live without wp-config.php if you have the database backup, as you can always make new database and create new wp-config.php.
Theoretically you could live without wp-content backup too, as you can install the plugins and theme again and re-upload your photos if you still have them. So that means that your database is the most important part of your WordPress installation and we will start with backing it up first.
Backup
You can setup regular WordPress database backups using WP-DBManager but if you want to do a quick backup, move the site, or install a local copy I recommend using phpMyAdmin interface to your database and doing 'Export'.
Most hosting solutions will have access to phpMyAdmin and all you have to do is select your database and go to Export tab.
Second step is to backup your wp-content folder and that is done through a FTP program. Most important folders inside it are uploads (your images and file attachments), themes and plugins. Copy the whole folder to a safe place.
Next is copying wp-config.php and .htaccess, which are just two configuration files.
This concludes your backup.
Restoring the backup
Here are some scenarios of doing a restore.
Database
- Import is typically performed through phpMyAdmin. You may need to drop (remove) old tables before you do that if you did not check "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION" when you did database export.
- If you lost your original database, you will need to create a new one and perform the import. Note that you may need to change wp-config.php file with your new database name, user and password
- If you are making a copy of the site to another site you need to do one more thing. There are two records in wp_options table called siteurl and home (this one is usually on the second page when you browse the table in phpMyAdmin). These two carry your website URL and tell WordPress what site it is installed on. You need to edit these two fields and enter the new site URL here
wp-content
This is pretty straightforward, just copy your wp-content to your site. All plugin and theme settings are saved in your database.
wp-config.php
This involves copying the file, if necessary. Be careful when copying wp-config.php over an existing file as the existing file could hold updated information. So I recommend you backup the existing file just in case.
.htaccess
Normally when you restore everything, you would go to WordPress->Settings->Permalinks and click Save. This will recreate your permalink settings and create .htaccess file.
Your site should work normally now. If it is still not the case you might want to compare the two files (backup file and created file) to see if there are any differences.
Note: Our ManageWP.com service allows automatic backups and also cloning of WordPress sites.
Suggested reading:
- How to move WordPress site to new server with zero downtime
- How to disable and delete post revisions in WordPress
- 5 cool WordPress plugins you never heard about
Posted in: WordPress
TAGS:backup wordpress full backup, full backup, full wordpress backup, how full wordpress, how make backup, how restore wordpress back, how wordpress backup, php database backup using, wordpress back images, wordpress backup, wordpress backup phpmyadmin, wordpress backup program, wordpress backup restore, wordpress backup restore plugin, wordpress full backup, wordpress photos backup







18 Comments
Fantastic! This is exactly what I needed. Now I have c complete clarity about what I have to do. I prefer to avoid using plugins as much as I can. Now I know exactly how proper backup is done.
I have also made an article called : Automatic WordPress Backups with Dropbox
http://www.squidoo.com/automatic-wordpress-backups-with-dropbox-free
And I also talk in that article about how to backup your free WordPress.com blog .
hope that helps someone !
Cheers !
I really need help, I want to back up all the content of my site because its always get hacked... what is the best plugins to back up all the content of my site.. There's a lot of plugins but I have already doubt on it.. Get hacked always hope you could help me..thanks
Thanks for sharing this information. I will surely try it. Please keep posting.
Hi Vladimir , great post . There are thousands of post about this subject i found none of them helpful...thanks for the beautiful tut ...cheers have a great weekend.
Thanks, I appreciate it!
Nice tutorial about backing up the wordpress installation and database effectively.
I am using a very nice plugin from http://www.xcloner.com to backup and restore my WordPress website, works like a charm....
okay, so does that mean all my pages and posts that i have on my dashboard will get saved on the database? or how do i save all that content? reply to my email pleaseeeeeeee.
hi -- i'm hoping you can please help. i had wordpress 9.1.1 with my logo, theme, layout etc. which forms part of my website. I updated to 9.2.2 and the whole look of my blog completely changed. my logo and theme disappeared and all the photo's i've uploaded appear squashed and warped . is there any way to go back to 9.1.1 or restore what seems to have completely changed? ie get my wallpaper, font, photo's back to how they previously were? thanks,
monica
[...]A complete guide describing how to do full WordPress backup and restore.[...]
How can I change wordpress table prefix without disabling any plugins?
You can check out my latest tutorial that shows you how to do that.
http://bacsoftwareconsulting.com/blog/index.php/wordpress-cat/change-your-wordpress-table-prefix-in-few-simple-steps/
Hello, Very useful tutorial for the moving wordpress site to another host. Thank u so mcuh..............
Hi Vlad,
Thanks so much for the Amazing Grace theme! I've been loving it for 3 months now, but today had a problem.
Why are these sidebars showing up in the left and bottom of my most recent post? They never showed up before, and I can't get rid of them!
http://theadventurouswriter.com/quipstipsspiritualseekers/
Thanks,
Laurie
Hi Laurie,
Sorry to say, this isn't the place for this question, I'll answer it but if you need anymore help then we'll meet in the forum next time.
What you are seeing on the screen is Google adsense and it is the probably because of a plugin you have installed or a script you have inserted.
WB
Hi Vladimir, I think every blogger should create a duplicate of their live blog locally to create a test enviroment.
This way they can test plugins and function without having to be worried about live effects.
Check out my post about this http://www.webtechwise.com/how-to-backup-your-wordpress-blog-and-install-it-locally-using-xampp/
Thanks
I use Cobian Backup to make automatic backups from FTP. However it became really slow and unreliable when there are thousand+ of folders and files.
Good way is to use file manager in cpanel (or whatever host uses) to pack everything into single archive and download it (just need to be careful to not create/leave it in public folder).
I pitched around idea for WP plugin that will zip and serve such file automatically but so far no takers. :) Might get to coding it myself when my skills up to it.