skip to Main Content

Sorry about this seemingly basic question, but I have looked at the similar questions and those solutions (including Bluehost documentation) hasn’t worked for me.

I have a Bluehost account hosting multiple add-on domains. Currently:

  1. a.com > Existing wordpress site, located at public_html/a
  2. b.com > Points to an empty directory at public_html/b

All I want to do is change my wordpress site from a.com to b.com.

I have read answers here, as well as other posts online, that suggest adding:

define('WP_HOME','http://b.com');
define('WP_SITEURL','http://b.com');

But of course that doesn’t work. I don’t see how that would work either since when I enter b.com, the server would be looking under folder b/ which is empty. I figure I’m just missing a simple step somewhere.

2

Answers


  1. Chosen as BEST ANSWER

    So this seems to be working for me so far:

    1. In wordpress, under settings, change both Wordpress and Site URLs to b.com
    2. After this, going to a.com/wp-admin won't work any more.
    3. In bluehost, remove public_html/b and rename public_html/a to public_html/b

  2. Did you check this tutorial?
    https://www.wpbeginner.com/wp-tutorials/how-to-change-your-wordpress-site-urls-step-by-step/

    Also what I would suggest is to use something like the Better Search Replace plugin https://wordpress.org/plugins/better-search-replace/ to scan your database and remove all references to domain "a.com" and replace it with "b.com"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search