WordPress: Update Domain Name

I am changing the domain name or url of my web site, how do I update WordPress website to the new url?

How do I update my WordPress URL?

 

There are a few options for this:

  1. Manual updates as follows:
    Quick Steps:
    Settings, General: WordPress Address (URL) and Site Address (URL): Update textDB Table: wp_options
    Edit entries for “siteurl” and “home” fieldsDetailed Steps:
    Backup your database in cPanel prior to making changes.
    Use phpMyAdmin to manage your WordPress database.Select WordPress database
    Select your WordPress database from the left.
    Select WordPress options table
    Then select your wp_options table.Click edit on siteurl
    Click Edit beside either the siteurl or home entries.
    Update siteurl
    Enter in your new value in the option_valuie field, then click Go

    WP-CONFIG.PHP
    Edit these lines:define(‘WP_HOME’,’http://example.com’);
    define(‘WP_SITEURL’,’http://example.com’);

  2. Connect to the database, and run these queries:

UPDATE wp_options SET option_value = replace(option_value, ‘http://OLDDOMAIN.com’, ‘http://NEWDOMAIN.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

UPDATE wp_posts SET guid = replace(guid, ‘http://OLDDOMAIN.com’,’http://NEWDOMAIN.com’);

UPDATE wp_posts SET post_content = replace(post_content, ‘http://OLDDOMAIN.com’, ‘http://NEWDOMAIN.com’);

UPDATE wp_postmeta SET meta_value = replace(meta_value,’http://OLDDOMAIN.com’,’http://NEWDOMAIN.com’);

UPDATE wp_options SET option_value = replace(option_value, ‘http://www.OLDDOMAIN.com’, ‘http://NEWDOMAIN.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

UPDATE wp_posts SET guid = replace(guid, ‘http://www.OLDDOMAIN.com’,’http://NEWDOMAIN.com’);

UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.OLDDOMAIN.com’, ‘http://NEWDOMAIN.com’);

UPDATE wp_postmeta SET meta_value = replace(meta_value,’http://www.OLDDOMAIN.com’,’http://NEWDOMAIN.com’);

 


Wordpress
Find and Replace

http://www.anysitesupport.com/wordpress-update-domain-name/
http://anySiteSolutions.com

By | 2017-12-01T23:47:25+00:00 May 12th, 2014|Documentation, Internet/Web, WordPress|0 Comments