How to use Navcat to modify all wordpress domain names

Source: Internet
Author: User
Tags wordpress domain
How to use Navcat modified wordpress all domain name including post article after the domain name I use plug-in useless I asked Navcat how to modify?


Reply to discussion (solution)

For example, you want to change the address of the blog from http://www.***.com to http://***.com, not simply in the WP background to modify the address, which will lead to the article chain error, then the next step is my operation to share.

The Navcat is replaced with an SQL statement.

The following SQL replacement commands are introduced first
UPDATE table name SET field = replace (field, ' Replace content ', ' replace value ');

Examples are as follows:
UPDATE wp_options SET option_value = REPLACE (option_value, ' http://www.***.com ', ' http://***.com ');

Note that the above punctuation must be in English half-width. Where wp_options is the table name, Option_value is a field in the table Wp_options, Wp_options has SiteURL and home values.

In general, you can complete the modification of the domain name by executing the following command:

Modify the site URL and home address in Option_value:
UPDATE wp_options SET option_value = replace (option_value, ' replace content ', ' replace value ');

Correct the address of the internal links and attachments in the article:
UPDATE wp_posts SET post_content = replace (post_content, ' replace content ', ' replace value ');

Correct the default permalink for WordPress articles:
UPDATE wp_posts SET GUID = replace (GUID, ' replace content ', ' replace value ');

Correct your website link in the blog User: (If your profile does not fill in your blog address, can be ignored)
UPDATE wp_users SET user_url = replace (user_url, ' replace content ', ' replace value ');

Correct your blog link in the reviewer profile:
UPDATE wp_users SET user_url = replace (user_url, ' replace content ', ' replace value ');

Correct the comment content of your blog link: (If the comment does not have your blog link, can be ignored)
UPDATE wp_users SET comment_content = replace (comment_content, ' replace content ', ' replace value ');

If you do not have the no self pings plugin installed, you need to do the following:
UPDATE wp_posts SET pinged = replace (pinged, ' replace content ', ' replace value ');
UPDATE wp_posts SET to_ping = replace (to_ping, ' replace content ', ' replace value ');

Basically there is a blog address where these are, in order to avoid the other has not been modified, you can search in the phpMyAdmin to get rid of the good.
The above is the actual operation of their own methods, there is a need to learn the next ...

  • Related Article

    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.