I have a single WordPress installation and my website is at "abc.com/site". Everything works great.
I want to move my site to "abc.com". The instructions I got from my hosting company are described at the link "codex.wordpress.org/Changing_The_Site_URL"
Do I simply need to edit my wp-config file to the following ?
define('WP_HOME','http://www.abc.com');
define('WP_SITEURL','http://www.abc.com/site');
I have never done this before and not sure about the correct values for WP_HOME and WP_SITEURL
. Can you please help me. I don't want to break anything.
Thank you
you can get by following
WP_HOME
andWP_SITEURL
must be same, you can also update yoursiteurl
,home
in your wp_options tableThis answer merely extends Jothi Kannan's answer
If you want to move a WordPress site to a new domain you need to also consider Filepath names stored in your database may have absolute URLs linking to the previous domain name.
If you have access to run SQL (maybe through PHPMyAdmin, SQL tab) then you might want to consider running the following queries on your new domain to ensure all domains have changed.
Change the values in wp_options
Match and replace old site URL in
wp_posts
guid
Match and replace old site URL in
wp_posts
post_content
An alternative to this is using a plugin called Duplicator which is brilliant - but requires a certain level of system resources to function properly in my experience. Duplicator will take a dump of your website where you can deploy it to a different environment using an
installer.php
file.It will import your database and change all the URLs for you as long as you specify the correct database credentials during installation.