WordPress is dynamically driven using your domain name. This means that WordPress Hosting site 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 (via the nameservers) to your account hosted on 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 be similar to the following format:
Configure WordPress to use Temporary URL
- To use your temporary URL with WordPress, simply install WordPress on the domain itself. Do not be concerned with the temporary URL yet.
- 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.
- To open the file to edit it, you will need to right-click on the file and click on Edit.NOTE: If an Encoding Check pop-up displays, simply click the Edit button to proceed.
- 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://ecbiz107.inmotionhosting.com/~userna5'); define('WP_SITEURL','https://ecbiz107.inmotionhosting.com/~userna5');NOTE: Be sure to replace ecbiz107.inmotionhosting.com/~userna5 with your actual temporary URL.
- Save the changes by clicking the Save Changes button in the upper right corner.
Congratulations! You have successfully changed WordPress to use your temporary URL.
Re-configure WordPress to Use Your Domain Name
When you are done testing your website using the temporary URL you will want to edit the wp-config.php file again and modify the code you entered into the file. Open the wp-config.php file with the file manager editor and replace your temporary URL with your actual domain name.
Alternative to Using the Temp URL
The temporary url is a great way to test your WordPress site is working prior to the site going live. There is another way to develop your WordPress site outside of the temporary url. You can perform a hosts file modification on your local computer. The hosts file modification “Fakes” your local computer in thinking the domain is on your server when in fact you are only connecting to the IP address.
Thoughts on “Installing WordPress Using Your Temporary URL”
How do I login once the code is inserted? I go to my temp url and I get the Inmotion page.
Hello. You’d need to delete the default.htm and index.htm pages in cPanel File Manager. Please contact Live Support if you need further assistance with this.
Is the process the same for VPS hosting? I’ve got WordPress in a folder for a client under /home/vhosts/sitename but have been having some trouble finding the complete path I would need to use for it (already have the temporary url but that didn’t work on it’s own so I’m assuming there must be more).
Yes, these instructions are the same for cPanel VPS Hosting. However, it’s important to note that the temporary URL will not work to view sites in directories at the same level or higher than the public_html directory. An alternative method to using the temporary URL is performing a Hosts file modification.
Is this still the best process to follow in our case, where we have a non-wordpress website hosted by InMotion but we would like to build a new website in WordPress? Are there any other steps we need to take?
We want to leave our old website live until we work on a new WordPress site and then swith over to the new site when ready.
If there are any other steps, would you mind sharing links to the guides and steps we need to take? We are not experienced in developing and hosting websites.
You could install it on a subdomain, then change all URL’s within the database upon completion.
Thanks for the tutorial. This has worked great. However, the images seem to not be loading. I click to view the image scr and gives me a 404 page. Any ideas on how to fix this?
It may be well advised to check the URL that the site is attempting to load, specifically if it is trying to load a domain name or the Temp URL used as a substitute. If it’s loading an undesired domain, check the home page settings listed in the article against what you currently have.
Hi! I’m building my 3rd site with my active domain pointing to the old host. I used to be able to change the below to my temp url by clicking code edit but now there’s only the edit option and I can’t find the below:
If it is not there, simply edit the file and insert the two lines of code after the first line of the file to set your temporary URL.
If you have access to the Dashboard, you can also make the change there. This and all methods for changing site name are covered in our full guide here:
WordPress – Changing the Site URL and Home Settings
Thanks ! I installed it per the instructions as the first two lines, and that didn’t work.
I then changed the location to line 2 and 3 after the “<?php” line, and it worked great.
I tried the “host” modifcation method, and it brought me to my inmotion hosting page,but never to the WordPress page.
Bob, thanks for pointing that out! I have updated, and corrected the article now!
In the wp-config.php code, do the two lines of code with the temporary URL go before or after the <?php, or somewhere else?
Hello Tom T,
It would be after
I have a live WP site that I want to leave up on my old host while I develop a new site for my client in my reseller account with you. I need to access the old site from my computer using their domain at the same time I’m installing WP and developing the new site. So I don’t think the ‘hosts mod file’ trick will work for this — correct? I should use their temporary domain for installing WP etc here?
You could certainly use a host file mod, but this would involve changing the hosts file and clearing your browser cache every time you wanted to see the ‘other’ site. In this case, it sounds like using these instructions for using the ‘temporary’ URL instead would be easier during development.
Thanks Scott. I saw that ‘hosts file mod” and that may make more sense.
Thanks for the information.
I’m using a temp URL because I have requested my Moroccan domain to be pointed at inmotion, but its probably going to take some time to be recognized, and I want to get started building a website right away.
I went through the Inmotion steps to create a temp URL so that WordPress recognizes my domain, but now am not sure what to do in order to get started.
I typed in the temp URL and it seemed to work (ie, took me my site via WordPress). But then when I typed in ‘wp-admin’ (which I think I need to do in order to starting building my site), it asks for a username and password. But it seems I can’t create a WordPress account/profile because it asks for my domain right out of the box, and it doesn’t recognize mine as valid.
In other words, it seems as though I still must wait for my domain to be pointed correctly notwithstanding that I now created a temp URL.
…or is there another way…
Instead of using the temp URL, you can always set up a hosts file mod. But the domain name in the registration should not matter. Are you getting some sort of error?
I am having the same problem as Barry with a multi-site.
Hello Rand Hoppe,
As per my response to Barry, the temporary URL depends on the settings you have entered for your WordPress installation. The temp URL is simply another way to reach the files and folders that make up your WordPress install. As long as your temp URL has properly replaced where the normal URL would be, then it should work. Check out this post on troubleshooting a WordPress multi-site using the temp URL. It may also provide some information to help you with your particular problem.
I hope this helps to answer your question, please let us know if you require any further assistance.
Your support team fixed the issue for me via chat. The WordPress permalinks needed to rebuilt …it’s as simple as logging into WP, settings > permalinks, and then clicking save. No changes need to be made. Hope this helps someone else!
Homepage loads but pages do not.
I used this method to migrate a WordPress site from another host and test before updating the nameservers. The homepage of the site loads correctly, but when going to any link, I get a blank page displaying my IP address.
Please help. Thanks!
Sorry for the problems with the temp URL. We would need more information about your installation including where you installed the WordPress files. We can troubleshoot the installation if you are a customer o InMotion Hosting.
It helped me a lot!
I’m receiving a 403 error while trying to edit a page in my WordPress instance, while using the temporary url… Any direction on how to resolve this issue? I’ve disabled plugins, and still no joy.
Using the temp URL is not always the best way to view proper behavior in WordPress. You may want to try a hosts file modification to see if that helps.
I have used this successufully several times, but does this work the same with multi-site? I ask because I have a multisite install, used the steps outlined but the temp url opens my live site at another host.
The temporary URL is basically simply another route to the web server where the main URL would normally be pointing. The WP configuration would simply need to be setup with that URL properly. If you’re using the temporary URL and it’s going to another location entirely, then we would need to examine that URL as well as how you’ve applied it in the WordPress install. A multisite installation uses the same database for all of the installations. Basically, as long as the path is correct and the database can be reached, then using the temp URL should work.
A great way to do this is actually just link to the server IP address in your hosts file on your local machine, that way you it doesn’t effect any site users until you’re ready to go live. It also makes migrating broken wordpress installations rather than cloning a site a lot easier.
Go to your hosts file and enter 1 line replacing the IP with your server IP (works on shared hosting as well) and replacing mysite.com with your website url, then save the hosts file (windows users can find this in C:/windows/System32/drivers/etc/hosts – and can edit easily using notepad++(free download) or MS wordpad):
### Start IP resolve for new server ###
184.108.40.206 www.mysite.com mysite.com
Thanks for the post about the hosts file change. We have two articles (one for PC and one for Mac) that walks a person through the steps in doing this. I also agree that if you do the hosts file you save your self a lot of headaches with moving the site after finishing its development. There are cases where a customer will want a fully working site, from the same location. This is where I would recommend that the alternate site be an add-on domain and the primary site re-directs to it temporarily until development is completed.
Here are the links for the tutorials to modify the hosts files:
Modify Your HOST files in Windows
Modifying your HOSTS file on a Mac
If you have any further questions or comments, please let us know.
Thanks, sir! Moving WordPress always turns out to be trickier than I think (especially when you have to use a temporary url). This works great!
Thanks so much for your post on this. I found it via google search, helping a friend with the same problem, and this fixed it. Much appreciated.