Cloud Service >> Knowledgebase >> WordPress >> What are the Steps to Change the WordPress Site URL?
submit query

Cut Hosting Costs! Submit Query Today!

What are the Steps to Change the WordPress Site URL?

Changing the WordPress site URL involves updating a few settings, whether you're changing it for the entire site or just for a specific page. Here’s how to do it:

Method 1: Change Site URL via WordPress Admin

Log in to WordPress Admin: Access your WordPress dashboard.

Navigate to Settings: Go to Settings > General.

Update Site Address:

In the "WordPress Address (URL)" field, enter the new URL for your site.

In the "Site Address (URL)" field, enter the new URL (if different).

Save Changes: Scroll down and click Save Changes.

Method 2: Change Site URL via wp-config.php

Access Your Site Files: Use FTP or a file manager from your cloud hosting control panel.

Locate wp-config.php: Open the wp-config.php file in the root directory of your WordPress installation.

Add or Modify Lines: Add the following lines (or modify them if they already exist):

define('WP_HOME', 'http://new-url.com');

define('WP_SITEURL', 'http://new-url.com');

Replace http://new-url.com with your new URL.

Save Changes: Save the wp-config.php file and re-upload if necessary.

Method 3: Change Site URL via Database (phpMyAdmin)

Access phpMyAdmin: Log in to your hosting control panel and open phpMyAdmin.

Select Database: Choose the database for your WordPress site.

Find wp_options Table: Locate the wp_options table (the prefix may vary if you changed it during installation).

Edit siteurl and home:

Find the siteurl row and click Edit. Change the URL to your new site URL.

Find the home row and do the same.

Save Changes: Click Go to save the changes.

Additional Steps After Changing the URL

Update Permalinks: Go to Settings > Permalinks and click Save Changes to refresh your permalinks.

Check for Mixed Content: If you switched from HTTP to HTTPS, ensure all resources load securely. You might need a wordpress plugin or manual adjustments.

Update Internal Links: Use a plugin like Better Search Replace to update old URLs in your content.

Important Notes

Backup: Always back up your site and database before making significant changes.

Redirection: If you’re changing to a new domain, consider setting up 301 redirects from the old domain to the new one to preserve SEO.

That’s it! If you have any further questions or need assistance, feel free to ask!

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!