How to configure WordPress to use a temporary URL
This article describes how to configure WordPress to use a temporary URL. You may want to do this, for example, to test a WordPress installation on a new domain before you update the domain's DNS records.
Configuring WordPress to use a temporary URL
When you move your WordPress site to a new domain, or install a brand-new WordPress site, you probably want to test it before you update the domain name's DNS and take the site “live”. To do this, you can use the shared URL for your account.
For information about how to obtain the correct shared URL for your hosting account, please see
this article.
However, some parts of the WordPress site may not display correctly (or at all) using a shared URL. To fix this, you can manually update the WordPress database to use the shared URL temporarily. To do this, follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see
this article.
- In the Databases section of the cPanel home screen, click phpMyAdmin:
In the left-hand pane of phpMyAdmin, click the WordPress database. A list of tables in the database appears:
Typically, the WordPress database is username_wpXXX or username_L3wpXXX, where username represents your cPanel username, and XXX is a three-digit number.
Under the Table heading, click the wp_options table. A list of data rows appears:
Under the option_name heading, locate siteurl, and then click Edit:
In the option_value text box, replace the current URL with the shared URL that you want to use for testing.
- Make sure you type the correct shared URL, or your WordPress installation will be inaccessible.
- Make sure the URL begins with http://.
- Make sure the URL does not end with a forward slash (/).
- Click Go. phpMyAdmin saves the changes in the table.
- Under the option_name heading, locate home, and then click Edit:
You may have to scroll through more than one page of data in the wp_options table to locate the home row. To do this, click the > icon, or you can click Show all to view all of the table's rows at once.
In the option_value text box, replace the current URL with the shared URL that you want to use for testing.
- As above, make sure you type the correct shared URL, or your WordPress installation will be inaccessible.
- Make sure the URL begins with http://.
- Make sure the URL does not end with a forward slash (/).
- Click Go. phpMyAdmin saves the changes in the table. WordPress should now function correctly using the shared URL.
Restoring the original WordPress URL
When you are done using the shared URL as a temporary URL for the WordPress installation, you must update the WordPress and site URLs with the site's actual domain name. However, instead of manually changing these values in phpMyAdmin, you can do this from the WordPress administration interface. To do this, follow these steps:
- Log in to WordPress as the administrator.
- Under Dashboard, click Settings, and then click General.
- Under General Settings, in the WordPress Address (URL) text box, type the URL using the site's domain name:
In the Site Address (URL) text box, type the URL using the site's domain name:
- Click Save Changes. WordPress should now function correctly using the site's domain name (assuming you have updated DNS for the domain and allowed sufficient time for DNS propagation to complete).
Related Articles
- Accessing your web site before DNS propagation is complete
When you update your domain’s name server settings, you must wait until DNS propagation is complete to start using your domain name. In the meantime, however, there are other ways you can view your web site, and this article shows you how.