WordPress Hard Coded Configuration Temporary “URL”

WordPress Hard Coded Configuration Temporary “URL”. When do we use WordPress temporary URL? Temporary URL is useful when your DNS is not pointing the namespace of the web hosting yet but you want to work (develop) on WordPress.

Okay, here is the scenario:

  • I have purchased a domain name but it is not pointing to my web hosting provider yet.
  • I added an add-on domain into my web hosting server (for example: http://www.jomsukan.com/mynewdomain.com).
  • Next, I setup WordPress into my web hosting server (same as above folder).
  • When I type my domain name into the web browser address bar, it will show an error.

Question, how can I then work on my WordPress?

Simple solution is to add a temporary URL into WordPress config file so you can work on it. I needed to add 2 additional lines in my WordPress config file. Here are the lines I added:

  • define(‘WP_HOME’,’http://www.jomsukan.com/mynewdomain.com’);
  • define(‘WP_SITEURL’,’http://www.jomsukan.com/mynewdomain.com’);

The above 2 lines are added after the 1st line of the config file like as shown in below image.

And now what I need to do is type in my address bar “http://www.jomsukan.com/mynewdomain.com” and I should be able to work WordPress directly. Once I set my namespace to my web hosting server, I just need to REMOVE both the lines in the config file.

Temporary URL does help in situation where you want to develop WordPress but not put in live yet. After all the development works been completed, all you need to do is just remove the 2 lines from the config file and site will be live. Of course, ensure that you install into the proper correct URL during Worpdress installation at the beginning.