The wordpress still has a domain name problem after the domain name is changed.

Source: Internet
Author: User
Tags change domain name phpmyadmin

Log on to the WordPress background as an administrator and click Settings & rarr; General. Change the WordPress address (URL) and site address (URL) to the new domain name, and click Save Changes.
 
Then, update the link comment link of the image in the article.
 

The code is as follows: Copy code

UPDATE wp_posts SET post_content = replace (post_content, 'www .111cn.net ', 'www .111cn.net ');

UPDATE wp_comments SET comment_content = replace (comment_content, 'www .111cn.net ', 'www .111cn.net ');

UPDATE wp_comments SET comment_author_url = replace (comment_author_url, 'www .111cn.net ', 'www .111cn.net ');


In this way, the three-condition SQL statement is written. If you use phpmyadmin to manage the database, it is better to operate it.

Phpmyadmin change domain name

1. Log on to phpmyadmin, find and open the current database, find the wp_options data table, and operate according to the figure:

Next, we can see the detailed field values of this data table in the body section on the right of the browser.

Find the WordPress installation address and blog address corresponding to the WordPress control panel background (the WordPress installation address corresponds to siteurl and the blog address corresponds to home), and follow the instructions in the figure to modify the two addresses, in this way, you can replace the blog domain name:

(Note: The pictures of ops cute are captured in the phpmyadmin local directory, and WordPress is installed in the second-level directory, so the website shown is http: // 127.0.0.1/WordPress)

Note: the "home" key value in the preceding figure can be found on the second page. You can flip the page as shown in the following figure:

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.