WordPress Change the domain name after the link error resolution method

Source: Internet
Author: User
Tags phpmyadmin

Error resolving replacement domain name
Note: The symbols for all of the following SQL statements must be in English half-width


Question: After changing the domain name, the website front desk opens the blank, backstage cannot log in;
WORKAROUND: Use the database management software phpMyAdmin to change the value of the Option_value field in Wp_options SiteURL and home.
SQL statement:

The code is as follows Copy Code
UPDATE wp_options SET option_value = REPLACE (option_value, ' original domain name ', ' new domain name ');

Problem: After changing the domain name, the internal link in the article and the address of the attachment is wrong;

Workaround: Also use phpMyAdmin to change the value of the Post_content field in Wp_posts.

SQL statement:

The code is as follows Copy Code
UPDATE wp_posts SET post_content = replace (post_content, ' original domain name ', ' new domain name ');

Problem: After changing the domain name, the article Permanent link address error;

Workaround: Also use phpMyAdmin to change the value of the GUID field in Wp_posts.

SQL statement:

The code is as follows Copy Code

UPDATE wp_posts SET GUID = replace (GUID, ' original domain name ', ' new domain name ');


Question: After changing the domain name, the author comments the website address error;

Workaround: Also use phpMyAdmin to change the value of the Comment_author_url field in Wp_comments.

SQL statement:

  code is as follows copy code

UPDATE Wp_ comments  set  comment_author_url  = replace (comment_author_url, ' original domain name ', ' new domain name ');

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.