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.
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.
- 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
This is pretty straightforward, just copy your wp-content to your site. All plugin and theme settings are saved in your database.
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.
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.
- 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