Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Change the WordPress URL Using phpMyAdmin in cPanel

This guide shows you how to fix or change your site address from the database. It helps when you cannot open your dashboard.

WordPress2 min read11 steps7 screenshots

What is this about?

A URL is a web address, like https://example.com. WordPress stores its address in a database. A database is a filing cabinet for your site's data. phpMyAdmin is a tool that lets you open it. You reach it from cPanel, the control panel for your hosting.

cPanel File Manager

You may need this after moving a site, adding SSL, or changing your domain name. Use it if the normal settings page does not load.

Warning: a wrong address can lock you out of your site. Take a backup of the database first. In phpMyAdmin, click Export and then Go.

cPanel public html

Steps

  1. Log in to your client area at https://secure.hostvento.com/clientarea.php.
  2. Open cPanel for your hosting service.
    cPanel WordPress file
  3. In the Databases section, click phpMyAdmin.
    cPanel phpMyAdmin
  4. On the left, click your WordPress database. Not sure which one? Look for DB_NAME in your wp-config.php file.
    cPanel tables
  5. Click the table named wp_options. Your prefix may be different from wp_.
  6. Find the row where option_name is siteurl. Rows are shown across several pages, so use the search box if needed.
  7. Click Edit on that row.
  8. In option_value, type the new address. Include https:// and leave off the last slash.
  9. Click Go.
  10. Do the same for the row where option_name is home.
    cPanel option value
  11. Open your new address in the browser and test.

Another way: wp-config.php

You can also add two lines to the wp-config.php file. Use File Manager in cPanel. Add them above the line that says to stop editing:

cPanel new domain
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

These lines override the database values. Replace example.com with your own domain.

Tip: Links inside old posts may still point to the old address. A search-and-replace plugin can fix those. The domain must also point to your hosting first. Ask Hostvento support if you need help.

Quick recap

  • Back up the database first.
  • Edit siteurl and home in the wp_options table.
  • Use the full address with https://.
  • Test your site afterwards.