Often one would like to assure its ongoing CMS or blog system or bring locally on his system started to perform various tests, for example, or locally to develop the system. This guide describes how to back up and restore a WordPress CMS and shows how you can move the entire CMS to another server or domain.
Basically, the system consists of the CMS files and a database, usually a MySQL database. Backup and Restore so you need a both a database dump and a backup of the file system, also the configuration must be changed because the new system also uses a different database.
Copy CMS Files
With an FTP program first all CMS files from the server to the local computer or on the target server on which the system is to be installed. It should be noted that a possibly existing. Htaccess file is transferred.
To backup your MySQL database, there are several ways and can be created with any client or by a script. In this example, I explain the Backup and Restore using the popular phpMyAdmin MySQLClients which is available for free. Depending on the version of phpMyAdmin, the surface may look different, important are the only options that activates the backup or restore and should be disabled:
After selecting the database, the database is exported using the “Export” button. As an export mode should “Custom” be selected to be able to change certain options or manually.
Necessary adjustments to database dump
If changes to the new system, the path to the installed CMS or the domain, certain adjustments to the dump are still making as these parameters are not defined in some tables. Here the existing places you can simply replace it with the new parameters on Find / Replace simple:
Import database on installed system
After the successful export of this database will be imported on the target system again. Here, the configuration file must be adapted to the new database so that the system works well and is not accessing accidentally to the live database.
In the wp-config.php (located directly in the WordPress base directory) the following settings are made:
Also the two variables WP-HOME and WP_SITEURL need to be set. This can be defined either directly in the database (Table options) or in the wp-config.php file as follows, if any, these values are always used in the configuration and not from the database.
Note: Changes made directly to the database are generally carried out very carefully beforehand and should in any case be a backup available!
Test new installation
After the move, of course, the new system should be tested and the administration – the links are adjusted permalinks, especially the settings of an htaccess file should be thoroughly tested.