CONTACT US: 1-800-622-4403
ABOUT    CONTACT SALES    SERVICE AREAS
Domains To Datacenter Since 1994

How to change the Wordpress site URL

There are many reasons you may need to change your Wordpress site URL.

For example if you're developing a new Wordpress site behind the scenes of your live site you may need to change the siteURL to an IP address.
 
Here are four ways you can change your site URL.

Option 1 - WordPress Dashboard - Click Settings > General screen in a single site installation of WordPress, there are two fields named "WordPress Address (URL)" and "Site Address (URL)". They are important settings, since they control where WordPress thinks your site is located. They control the display of the URL in the admin section of your page, as well as the front end, and are used throughout the WordPress code.

The "Site Address (URL)" setting is the address you want people to type in their browser to reach your WordPress blog.
The "WordPress Address (URL)" setting is the address where your WordPress core files reside.

Option 2 - using phpmyadmin - Within your Customer Control Panel > Click the More Services Tab > Click Databases > Click the database that is associated with your WordPress site. Click the link to Browse database manager. Click on the + to see all the tables, click the wp_options table.
In the middle of screen you'll see the table rows. Find and click the edit link for the siteurl table. Enter the desired URL and click Go to save changes.

Option 3 - Edit wp-config.php - It is possible to set the site URL manually in the wp-config.php file. Add these two lines to your wp-config.php, where "example.com" is the correct location of your site.

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

This is not necessarily the best fix, it's just hard coding the values into the site itself.

You won't be able to edit them on the General settings page anymore when using this method.

Option 4 - Edit functions.php - If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.

1. FTP to the site, and get a copy of the active theme's functions.php file. You're going to edit it in a simple text editor and upload it back to the site.

2. Add these two lines to the file, immediately after the initial "<?php" line.

update_option('siteurl','http://example.com');
update_option('home','http://example.com');

Use your own URL instead of example.com, obviously.

Important! Do not leave those lines in the functions.php file.

Remove them after the site is up and running again.


Websites

  1. How To Install WordPress
  2. Hosting Multiple Domains on One IP Address (SuperAccount)
  3. Where can I find the FTP information for my POA account?
  4. How to modify CSS on Mobile Devices
  5. How to generate a CSR, purchase & Install the Certificate in the POA System
  6. Change Your Domain Name using WordPress
  7. How to enable .NET 4.0 for your POA Account.
  8. How to remove Pages/Posts from Wordpress Search
  9. How to disable all Wordpress plugins using MySQL
  10. Remove index.php from Wordpress URL
  11. How to move a Drupal site from one host to another
  12. How to move a Wordpress site from one host to another
  13. How to change the Wordpress site URL
  14. Masking Your Email from Spammers with WordPress + PHP
  15. How to Redirect a Registered Domain
  16. Changing the Wordpress URL Path to web root "/" or another path
  17. Simple Way to Secure a WordPress Website
  18. How to restart your website in Control Panel.
  19. How to Block Referral SPAM from your Website
  20. Creating Campaigns in Google Analytics
  21. Switching over to a New InfoQuest account.
  22. Stopping your website through the customer control panel.
  23. Deleting a domain from your account.
  24. Where do I go to view my web stats (AWStats) for my site?
  25. How to change Wordpress siteURL to IP address using phpmyadmin
  26. How to enable "anonymous access" to browse my site.
  27. How to access Wordpress files.
  28. How to add a dedicated/exclusive IP address to your account.
  29. How to upload website content to the server.
  30. Update Directory Path for Website.
  31. Password protecting a folder on your site on POA.
  32. Add Structured Data Location Schema to your website
  33. How to delete WordPress Comments using phpmyadmin
  34. How to password protect a specific directory on your POA Hosting Account.
  35. What's New in Wordpress 4.9

Feedback and Knowledge Base