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
-
Log into WordPress
- Access the WordPress Dashboard using SSO from the Shared Hosting Control Panel or by logging in at
yourdomain.com/wp-admin
.
- Access the WordPress Dashboard using SSO from the Shared Hosting Control Panel or by logging in at
-
Navigate to General Settings
- Go to Settings > General in the left-hand menu.
-
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
).
- WordPress Address (URL): This is where your WordPress core files are stored (e.g.,
- In the WordPress Address (URL) and Site Address (URL) fields, update the URLs to the desired domain:
-
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.
-
Access wp-config.php in the Shared Hosting Control Panel
- Log into the Shared Hosting Control Panel.
- Open File Manager and locate
wp-config.php
in your WordPress root directory.
-
Edit wp-config.php
-
Right-click
wp-config.php
and select Edit. -
Add the following lines above
/* That's all, stop editing! Happy blogging. */
: -
Replace
https://yourdomain.com
with your actual domain.
-
-
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.
-
Log into phpMyAdmin
- Access phpMyAdmin from the Shared Hosting Control Panel.
-
Select Your WordPress Database
- In phpMyAdmin, select your WordPress database from the left sidebar.
-
Locate the
wp_options
Table- Click on wp_options (the prefix may vary based on your installation).
-
Edit Site URL and Home URL
- Find the rows for
siteurl
andhome
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.
- Find the rows for
-
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 ofhttp://
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.