How to Change WordPress Site URL via cPanel Database

How to Change WordPress Site URL via cPanel Database

How to Change WordPress Site URL via cPanel Database

A step-by-step guide to update your WordPress site URL directly through the database using cPanel’s phpMyAdmin.

Why Change Your WordPress Site URL via Database?

Sometimes, you might need to change your WordPress site URL if you have moved your website to a new domain, fixed a broken URL, or updated your site from HTTP to HTTPS. If you cannot access your WordPress dashboard, changing the URL via the database is a quick and effective solution.

Important: Backup Your Database First

Before making any changes, always create a full backup of your WordPress database to avoid data loss in case of any errors.

Step 1: Log in to cPanel

  1. Go to your hosting provider’s cPanel login page.
  2. Enter your username and password to access the cPanel dashboard.

Step 2: Open phpMyAdmin

  1. In the cPanel dashboard, scroll down to the Databases section.
  2. Click on phpMyAdmin to open the database management tool.

Step 3: Select Your WordPress Database

  1. In phpMyAdmin, locate your WordPress database from the list on the left sidebar. If you are unsure of the database name, check the wp-config.php file in your WordPress root directory for the DB_NAME value.
  2. Click on the database name to view its tables.

Step 4: Edit the siteurl and home URL in wp_options Table

  1. Find and click on the table named wp_options. (Note: The prefix wp_ may be different if customized during installation.)
  2. Look for the rows with the option_name siteurl and home. They are usually within the first few rows.
  3. Click the Edit button next to each to modify their values.
  4. Replace the existing URL with your new site URL (e.g., https://www.newdomain.com).
  5. Click Go or Save to apply the changes.

Step 5: Clear Your Browser and WordPress Cache

After updating the URLs, clear your browser cache to avoid loading old data. If you use caching plugins in WordPress, clear those caches too.

Step 6: Test Your Website

Visit your website using the new URL to ensure everything loads correctly. Login to your WordPress admin dashboard using the new URL.

Troubleshooting Tips

  • If you encounter login issues, clear cookies and try again.
  • Check your wp-config.php file for any hardcoded URLs.
  • If the site still points to the old URL, verify that your domain DNS settings are updated correctly.

Conclusion

Changing your WordPress site URL via the cPanel database is an effective way to fix URL-related issues, especially when you cannot access the WordPress admin dashboard. Always remember to backup your database before making changes and proceed carefully.

Post Your Comment

Build Your Website with HiveRift

From professional business to enterprise, we’ve got you covered!

©2025, Hosting. All Rights Reserved by GutenKit

HiveRift
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.