When WordPress went online, the link address still points to the local address.

Source: Internet
Author: User
========================================================== =============================== 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:

    1. Only perform a search and replace on the wp_posts table.
    2. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.