This article mainly for you in detail on the WordPress website to move to the local run test method, with a certain reference value, interested in small partners can refer to
As a webmaster, sometimes we may encounter the replacement of the server or for the site to do a whole layout modification and upgrade, we first need to do is the database and the entire WordPress site theme and plug-ins and other related files for local backup. Personally think that if you want to make big changes to the site, such as changing the site framework or the structure of the site, it is best to transfer the entire site to the local run test, so as to ensure the progress and efficiency of the changes, do not need to change the effect of repeated upload overlay, You can test the entire site and then make the final upload.
So how do we transfer the WordPress site on the FTP server to the local? In fact, the main problem is the database modification, just began to encounter a lot of problems, the database import is smooth, but when you install a good WordPress program, because the domain name and login password are inconsistent, There are also file paths that need to be modified accordingly. Let me share with you how to move the WordPress website to run locally.
1. Back up the database, the first thing I want to do is to back up the database, directly to the phpMyAdmin background export database can, I use the Western Digital it has a practical (through the SQL file import and export) function can directly back up the database to the specified FTP folder, Of course, other host providers should have this feature, if not can be phpmyadmin in the manual backup is good.
2. To the WordPress website program for the entire backup, we recommend that you first to the respective host provider above the file management in the compression, and then through the FTP download, so the speed will be faster.
3. On-premises data recovery, first you have to install a local environment, personal advice to use XAMPP, a powerful integration package, OK after entering localhost into the Xampp interface for simple settings, here is mainly to modify the database login password.
Enter the security options interface Click http://www.php.cn/to modify, the default is no password, the MySQL user name root can not be modified to know on the line, in order to facilitate the diagram, I will change the login password to the online backup of the website password consistent, so you do not need another The password in the wp-config.php file is modified outside the
4. Enter the phpMyAdmin management interface to create a database, it is recommended to change the database name with the backup database name, you can save some unnecessary trouble. After you create the database, import the database you backed up. And then put the backup good WordPress program in the Htdocs folder, I have built a folder called Mylive here to put the WordPress program inside.
5. In the critical step, first change the SiteURL field in the Wp_options table to a local URL in phpMyAdmin, such as changing the original domain name path http://www.php.cn/to local path http://www.php.cn/. Before encountering a problem is to import the database, in the address bar after entering http://www.php.cn/login will be directly jump to the online WordPress background management, rather than local background management. If the above problems occur, simply modify the SiteURL field URL to resolve.
6. Open the local WordPress folder in the wp-config.php file, the MySQL database user name to the root password if it is consistent with the database password of the online site, there is no need to change.
7. The last step in the Address bar, enter http://www.php.cn/to enter the local WordPress background Management General Options, the wordpress address (URL) and the site URL as shown:
Conclusion: To this point basically done, check the path is normal.
Enter http://www.php.cn/, home to the daylight.
Click on an article to see if the correct display, mainly to detect the local URL path can open normally.