Last update at :2024-04-06,Edit by888u
Nowadays, many people often change the domain name of their website. After changing the domain name, the website link often reports an error. So how can WordPress completely change the domain name of the entire site? The blogger will bring you a very simple method today. It only takes two commands to change your WordPress to your new domain name in batches.
1. WordPress domain name change in batches
- Need to use phpmyadmin database management tool
1. Change the installation address and blog address of the blog. First use phpmyadmin to open your database, then find the data table wp-options and find the first record, which is siteurl< /strong>This one, and home, just change the address to the last domain name you changed. Only after completing this step can you successfully enter the backend, otherwise even if you enter the password, it will automatically jump to the original old domain name. Then select the current website database in phpmyadmin management, then click the Click SQL button at the top and enter the following code in the input field:
2. Next, continue to modify all the links inside the article to your new domain name. The internal links are the other incoming addresses of this site that you insert in the article when you publish the article. We must change the old domain name linked within the article to the new domain name. Because the old domain name has no meaning anymore! Many people like to make changes one by one from the backend article editor. Obviously, that is unrealistic and very troublesome! In fact, there is a simpler method, which is to use phpmyadmin to enter your database and execute the following statement to batch change all the old domain names in the article to new domain names:
3. After executing the above command, this modification is basically completed, and then you can directly use the new domain name to log in to the backend.
4. Regarding the GUIDS modification of wordpress, you can refer to Baidu
Recommended site searches: Host sharing, Wanwang domain name registration official website, Alibaba Cloud free virtual host, vps virtual host domain name check, how much does general server hosting cost, foreign domain names, me domain names, US server defense, European serversUPDATE wp_options SET option_value = replace( option_value, 'http://www.old.com', 'http://www.new.com' ) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace( post_content, 'http://www.Old.com', 'http://www.net.com' );
UPDATE wp_posts SET guid = replace( guid, 'http://www.Old.com', 'http://www.new.com' ) ;
发表评论