Point domain to different webhost’s subdirectory wordpress

Now there may seem to be duplicates for this question but nothing concise so I’m going to try:

I have a wordpress install setup at mydomain.com/subdir – hosted on fatcow.

Read More

I went ahead and bought a domain from godaddy.com(cos it was dirt cheap)

-pointed the name servers where needed.(fatcow’s servers)

Opened fatcow control panel:

-added the newdomain.com and pointed it to mydomain.com/subdir.

On opening it points to the mydomain.com/subdir

when I update the site url to newdomain.com(from the WP admin panel)
it opens the homepage as newdomain.com but when I open any links it gives me a 500 server error.

If I try to login to the website, the login screen just refreshes every time i enter the correct credentials.

I’ve gone through the codex extensively, it’s very ambiguous considering the scenario I’m facing.

Some background about my setup:

I have a newdomain.com-redirect folder in my hosting space.
I want to host two sites in different sub folders such that :
mydomain.com/ points to mydomain.com/blog and
newdomain.com/ points to mydomain.com/subdir

any help will be hugely appreciated.

Regards,

Rishav S

Solution:

After you update the site-url and cannot access anything apart from the homepage, you will
need to update the permalinks of your website, access the backend using domain/wp-login.php instead of domain/wp-admin/ and save the permalinks once again.
don’t need to do a string replace in your database(however it is recommended otherwise your assets will be requested from the old domain), moving folders etc.

Related posts

2 comments

  1. All links in the content was saved in the databases, pure strings. If you have change change the settings of the wordpress install to an new domain, then it is important that you change also the links inside the content. This is possible with a sql statement or also with plugins and helper.

    1. WP Plugin
    2. Helper

    If you will change the settings url from the wp install, then is it a easy way to do this via constant inside the wp-config.php.

    // Home URL of your WordPress.
    define( 'WP_SITEURL', 'http://localhost/wpbeta' );
    // URL to the WordPress root dir.
    define( 'WP_HOME', 'http://localhost/wpbeta' );
    
  2. The OP solved it by himself

    After you update the site-url and cannot access anything apart from the homepage, you will need to update the permalinks of your website, access the backend using domain/wp-login.php instead of domain/wp-admin/ and save the permalinks once again. don’t need to do a string replace in your database(however it is recommended otherwise your assets will be requested from the old domain), moving folders etc.

Comments are closed.