Migrating to GridPane using a Temporary Domain

At the current moment, you can’t change the primary domain name for a GridPane site, you’re stuck with the original domain. This causes problems even when you add an additional temporary domain.

As an example, let’s say you have a server named srv01.wpinfo.net pointed to 192.168.0.1 and you set up a wildcard record in DNS for *.srv01.wpinfo.net also pointed to the same IP Address.

You set up a new site called newsite.com and add a temporary domain of newsite.srv01.wpinfo.net to the site in GridPane. This temporary domain will resolve automatically due to the wildcard record.

You can visit the temporary domain newsite.srv01.wpinfo.net and see a default WordPress site as we’ve just created the site in GridPane. However, you’re unable to access /wp-admin as it redirects to the primary domain newsite.com which is pointed to another server that you’re trying to migrate away from.

You have two options to get around this issue.

DISCLAIMER

The following commands change how your GridPane server functions. This may void any support provide by GridPane, use at your own discretion. If you contact GridPane support, inform them that you made these changes.

Advice

If you want to know how to enable SSH for GridPane system users and su from root, see this article.

Enabling SSH for GridPane System Users (Including su from root)

Option 1 – Change WordPress Domain using wp-config.php and wp-cli search-replace

You can update the wp-config.php and change the domain name.

PHP

And then run wp-cli search-replace to find and replace the primary domain with the new temporary domain.

Shell

Option 2 – Using the Multiple Domain plugin.

You can use a plugin called Multiple Domain, which does exactly what it’s named. It will allow you to use two or more domains on your WordPress install.

Unfortunately, you can’t log in to the sites WordPress admin to install and configure the plugin. This is where wp-cli comes in.

Shell
2 Shares:
You May Also Like