Running WordPress from a Temporary URL

269ac00f765508cb74b25d006dbf5bb2

Written by Dennis Nind

Last published at: February 8th, 2019

WordPress is dynamically driven using your domain name. This means that WordPress will not work correctly using your temporary URL if it was configured to be installed using your domain name. Take for instance, if you are migrating an existing WordPress site from another host to InMotion hosting, you will want to migrate the site and test it prior to pointing the domain name to our servers. We advise using your temporary URL to test your WordPress site before pointing your domain to our servers. If you install WordPress using Softaculous located in cPanel, you won't directly have the option to install it using a temporary URL, so you can follow the steps below to get this working properly. If you need help locating your temporary URL, you can find it in your Account Management Panel (AMP). Your temporary URL will resemble: https://servername.cloudns.io/~accountname i.e. https://alfa.cloudns.io/~brixly

Configure WordPress to use temporary URL

  1. To use your temporary URL with WordPress, simply install WordPress on the domain itself. Do not be concerned with the temporary URL yet.
  2. Next you will need to locate the wp-config.php file in file manager in cPanel. The wp-config.php file will be located in the root folder where you initially installed WordPress.

  3. Next, you will need to right-click on the file and select "code edit".

  4. This will open the actual code of the file, and you will need to insert two lines of code after the first line of the file to set your temporary URL as the way to access your WordPress installation.
    define('WP_HOME','https://alfa.cloudns.io/~brixly');
    define('WP_SITEURL','https://alfa.cloudns.io/~brixly');
    In your file, https://alfa.cloudns.io/~brixly will need to be replaced with your own temporary url.
  5. Save the changes by clicking the "save change" button in the upper right corner.

Congratulations! You have successfully changed WordPress to use your Temporary URL.

Changing WordPress back to use your domain name

When you are done setting up and testing your website using the temporary URL you will want to edit the wp-config.php file again and remove the code you placed into the file. Open the wp-config.php file with the code editor and replace your temporary url with your actual domain name.

Alternatives to using the Temp URL

The temp url is a great way to get your WordPress site working prior to the site going live. There is another way to develop your WordPress site outside of the temp url. You can use a Hosts File mod on your local computer. The Hosts file mod "Fakes" your local computer in thinking the domain is on your server when in fact you are only connecting to the IP address.