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. How to modify CSS on Mobile Devices
  4. Change Your Domain Name using WordPress
  5. How to enable .NET 4.0 for your POA Account.
  6. How to remove Pages/Posts from Wordpress Search
  7. How to disable all Wordpress plugins using MySQL
  8. Remove index.php from Wordpress URL
  9. How to move a Drupal site from one host to another
  10. How to move a Wordpress site from one host to another
  11. How to change the Wordpress site URL
  12. Masking Your Email from Spammers with WordPress + PHP
  13. How to Redirect a Registered Domain
  14. Changing the Wordpress URL Path to web root "/" or another path
  15. Simple Way to Secure a WordPress Website
  16. How to restart your website in Control Panel.
  17. How to Block Referral SPAM from your Website
  18. Creating Campaigns in Google Analytics
  19. Switching over to a New InfoQuest account.
  20. Stopping your website through the customer control panel.
  21. Deleting a domain from your account.
  22. Where do I go to view my web stats (AWStats) for my site?
  23. How to change Wordpress siteURL to IP address using phpmyadmin
  24. How to enable "anonymous access" to browse my site.
  25. How to access Wordpress files.
  26. How to add a dedicated/exclusive IP address to your account.
  27. How to upload website content to the server.
  28. Update Directory Path for Website.
  29. Password protecting a folder on your site on POA.
  30. Add Structured Data Location Schema to your website
  31. How to delete WordPress Comments using phpmyadmin
  32. How to password protect a specific directory on your POA Hosting Account.
  33. What's New in Wordpress 4.9
  34. Adding A Domain To My Account. (POA)
  35. Using a Web.Config Redirect
  36. Using CDOSYS with POA accounts without authentication
  37. Permanent 301 redirect
  38. Using CDOSYS with POA accounts with authentication

Feedback and Knowledge Base