========================================================== =============================== Original blog, reprinted please declare the source of Electronic coffee (original id blue rock) ========================================================== =============================== busy for N days, my WordPress was finally mounted to the public network and started to be inside, but there was a problem. All the links above, whether in my blog or the page Jump link of the WordPress system, are still directed to localhost, not my domain name. Well, it's an excellent quality for our IT staff. I started to find a solution. The WordPress official website provides solutions to the problem in "N", including your WordPress name change, WordPress path change, and webpage URL change. Here I will only introduce my situation, is the URL change. When your domain name or URLs change
When your domain name or URL changes, such as-I. e. from http://example.com/blog to http://example.com, or http://example.com to http://newexample.com-T, although our database has moved, but these domain names or URLs are also stored in the database, once causing a link issue. There are two official solutions:
- Only perform a search and replace on the wp_posts table.
- Use the search and replace for WordPress databases script to safely change all instances. (If you are a developer, use this option. it is a one step process as opposed to the 15-step procedure below)
First, I thought that he only modified the log link, and the effect was not good. So I adopted the second solution. First download the appropriate PHP script http://interconnectit.com/124/search-and-replace-for-wordpress-databases/, unzip it and get searchreplacedb2.php, placed in your WordPress root directory (and wp-config.php) at the same level. Then access the corresponding searchreplacedb2 through a browser, such as www.example.com/wordpress/searchreplacedb2.php, for example. Let you select the method to obtain the database information, click Next: Confirm, click Next: select the table name of the field you want to replace, select all here: Click next: enter the name you want to search for and replace in search and replace, and click OK and OK Next. Remember to delete the searchreplacedb2.php file to avoid misoperation.