How to change the WordPress URL from phpMyAdmin in cPanel
After moving a site, enabling SSL or changing domains, the CMS can redirect to an old address or block access to the admin dashboard. In cPanel, you can correct it from phpMyAdmin by editing the siteurl and home values in the options table.
Make this change carefully: a mistyped URL can cause redirect loops. If you are not sure which database the site uses, first check wp-config.php from File Manager.
Before you start
- Have access to cPanel for the affected domain.
- Identify the folder where the site is installed, usually
public_htmlor a subdomain folder. - Export the database before editing values.
- Define the exact final URL, for example
https://yourdomain.comwithout a trailing slash.
Steps
- Log in to cPanel and open File Manager to locate the site’s
wp-config.phpfile. - Open
wp-config.phpin read-only mode and copy theDB_NAMEvalue; that is the database name you will review. - Go back to cPanel and open phpMyAdmin from the databases section.
- In the left panel, select the database that matches
DB_NAME. - Find the table that ends in
_options. The prefix can vary, for examplewp_options,nh_optionsor a custom one. - In that table, locate the
siteurlandhomerows. They usually appear on the first table pages. - Edit the
option_valuefield forsiteurland enter the exact final site URL. - Edit the
option_valuefield forhomewith the same URL, unless your installation uses a special structure. - Save the changes, open the site in a private window and also check access to the admin dashboard.
Values you need to change
| Row in the options table | Field you edit | Example value |
|---|---|---|
siteurl | option_value | https://yourdomain.com |
home | option_value | https://yourdomain.com |
Final verification
- The domain opens without redirecting to the old address.
- The admin dashboard loads with the correct final URL.
- In phpMyAdmin,
siteurlandhomeshow the same expected address. - The browser no longer shows a repeated redirect chain.
Common errors
- The site redirects to the old URL → Only one of the two rows changed → check
siteurlandhomein the options table. - You cannot find
wp_options→ The installation uses another table prefix → find the table that ends in_optionsinside the database shown inwp-config.php. - A privacy or padlock error appears → The URL uses
https://but SSL is not ready yet → validate SSL in cPanel before testing again.
When to ask for help
Open a ticket if the database does not appear in phpMyAdmin, if the siteurl and home rows do not exist, if the change does not save or if the site belongs to an incomplete migration. Share the affected domain, the expected final URL and the approximate time of your tests.
Recommended reading
Still need help?
If this guide didn’t solve your issue, our team can help you via ticket.