Contact
Site: US UK AU |

How to change WordPress URLs

How to change WordPress URLs

With phpMyAdmin

  1. Log in to your SiteWorx account.

    • If you do not know your password, click Forgot your password on the login page.
    • If you do not know the web address for your SiteWorx login page, either refer to your Welcome Email or contact our 24-hour Support Team for assistance.

  2. On the left, select Hosting Features > MySQL > PhpMyAdmin (Figure 1).

    Figure 1. Hosting Features > MySQL > PhpMyAdmin selection in SiteWorx.

  3. On the left menu, locate and click the base URLs relating to the relevant the WordPress database.  
  4. In the main table, locate the wp_options table (Figure 2).

    Figure 2.  wp_options table.

  5. Modify the following entries in the table, as follows:
    • Under the option_name column, locate the siteurl entry, and click the corresponding Edit option.

Figure 3. Modify the table entries.

    • In the option_value field, type the URL, and then click Go to save the change.
    • Under the option_name column, locate the home entry, and corresponding Edit option.
    • In the option_value field, type the URL, and then click Go to save the change.
  1. If you have a WordPress caching module, flush the module's cache, and the new URLs should work correctly. 

With the command line

  1. Log in to your server, using SSH credentials provided to you by a Nexcess Support Technician.
  2. Enter your MySQL database by executing the following command:

use database; where database is the name of the WordPress database.  

  1. Execute the following commands, replacing the old URL and the new URL values:  

    UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

    UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

  2. If you have a WordPress caching module, flush the module's cache, and the new URLs should work properly.  

 

For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How to install WordPress
Added on Tue, Aug 6, 2013
How to configure a WordPress multi-site network
Added on Thu, Mar 13, 2014
How to configure WordPress plug-ins
Added on Tue, Jul 30, 2013
How to add Favicons to WordPress
Added on Thu, Oct 31, 2013
How to combat WordPress comment spam
Added on Wed, Oct 29, 2014
How to change your WordPress admin password
Added on Mon, Jun 4, 2018
What is WordPress?
Added on Wed, Sep 11, 2013
What is W3 Total Cache?
Added on Fri, Oct 31, 2014
How to configure WordPress file permissions
Added on Wed, Oct 29, 2014
How to configure the Nexcess CDN with WordPress and W3 Total Cache
Added on Thu, Mar 8, 2018