Scott Mollon
Scott Mollon

Reputation: 47

Wordpress - Changing Wordpress in Place to a New Domain

I have Wordpress install at scottmollon.com/williammessner-loebs The files are in public_html/williammessnerloebs

But we wanted to get him his own domain. So I got bloebs.com, and set it up as an Add-On Domain with my host provider (A2 Hosting). I configured bloebs.com to point to /public_html/williammessnerloebs

So if you go bloebs.com you correctly see the wordpress site. But if you click on a post it takes you to scottmollon.com/williammessnerloebs/2019/10/10/appearances/ for example.

I'd like to have all the urls be bloebs.com urls.

I tried changing the site url and home url in my Wordpress general settings, but that just breaks everything. Pages load with no formatted or styled content or images. I've fixed it by editing those urls back to scottmollon.com urls in my database.

Is there anyway I can accomplish what I hope to do?

Upvotes: 0

Views: 48

Answers (1)

rank
rank

Reputation: 2534

The first step you took was the right. But there is some more to do:

  1. Change your site url and home url. You can do this in the backend in general settings, or you can edit your wp-config.php file and add (maybe you have https):

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

  2. Log into your backend (you will be logged out at first) and go to your general settings to check if the new url is set. Also go to "permalinks", make your choice and hit save.

  3. Install a Plugin to overwrite the urls in your database, like https://wordpress.org/plugins/go-live-update-urls/ In this plugin you just need to enter your old wordpress url and then your new url. You do not need to overwrite plugin files, so keep that unchecked.

  4. After that, everything sould be working fine. You can delete the plugin again, because you don't need it anymore.

  5. If you have any urls in your theme files, that you are not getting dynamically but have inserted them by hand, you have to edit this by hand. The Plugin "Go live..." will only overwrite the urls in your database.

Hope this helps you out.

Upvotes: 1

Related Questions