How to Update Your WordPress Site URL and Home URL Print

  • 0

How to Update Your WordPress Site URL and Home URL

Updating your WordPress Site URL and Home URL may be necessary if you’ve moved your site to a new domain or if the URLs were set incorrectly. This guide provides methods to update these URLs from within WordPress, through wp-config.php, or using phpMyAdmin.


Method 1: Update Site URL and Home URL in WordPress Dashboard

  1. Log into WordPress

    • Access the WordPress Dashboard using SSO from the Shared Hosting Control Panel or by logging in at yourdomain.com/wp-admin.
  2. Navigate to General Settings

    • Go to Settings > General in the left-hand menu.
  3. Edit Site URL and Home URL

    • In the WordPress Address (URL) and Site Address (URL) fields, update the URLs to the desired domain:
      • WordPress Address (URL): This is where your WordPress core files are stored (e.g., https://yourdomain.com).
      • Site Address (URL): This is the address visitors use to access your site (e.g., https://yourdomain.com).
  4. Save Changes

    • Click Save Changes at the bottom to apply your new URL settings.

Method 2: Update Site URL and Home URL in wp-config.php

If you can’t access the Dashboard, you can update the URLs in the wp-config.php file.

  1. Access wp-config.php in the Shared Hosting Control Panel

  2. Edit wp-config.php

    • Right-click wp-config.php and select Edit.

    • Add the following lines above /* That's all, stop editing! Happy blogging. */:

      php
      define('WP_HOME', 'https://yourdomain.com'); define('WP_SITEURL', 'https://yourdomain.com');
    • Replace https://yourdomain.com with your actual domain.

  3. Save Changes and Test

    • Save the file and refresh your website. These values will override any settings in the WordPress Dashboard.

Note: If you use this method, WordPress will lock the URL fields in the Dashboard to prevent changes there.


Method 3: Update Site URL and Home URL Using phpMyAdmin

If neither the Dashboard nor wp-config.php methods work, you can directly update the database using phpMyAdmin.

  1. Log into phpMyAdmin

    • Access phpMyAdmin from the Shared Hosting Control Panel.
  2. Select Your WordPress Database

    • In phpMyAdmin, select your WordPress database from the left sidebar.
  3. Locate the wp_options Table

    • Click on wp_options (the prefix may vary based on your installation).
  4. Edit Site URL and Home URL

    • Find the rows for siteurl and home in the option_name column.
    • Click Edit next to each and replace the URL in the option_value field with your new URL.
    • Click Go to save each change.
  5. Test Your Site

    • After updating, refresh your site to confirm that the URL change has taken effect.

Tips for Changing URLs Safely

  • Back Up Your Site: Before making changes, back up your site files and database to avoid data loss.
  • Use HTTPS for Security: If your site has an SSL certificate, update URLs to use https:// instead of http:// to maintain a secure connection.
  • Update Permalinks: After changing URLs, go to Settings > Permalinks in the Dashboard and click Save Changes to refresh permalinks.

By following these steps, you can successfully update your WordPress Site URL and Home URL. For additional assistance, feel free to reach out to our support team.


Was this answer helpful?

« Back

Problems with your site? Let Us Know 24/7

©2024 Lone Star Data Ranch - All rights reserved