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

How to Change the WordPress URL Using phpMyAdmin in DirectAdmin

If you cannot open your WordPress dashboard after a domain change, you can fix the site address in the database. This guide shows how with phpMyAdmin.

DirectAdmin2 min read12 steps8 screenshots

What is phpMyAdmin?

A database is where WordPress stores its settings and posts. phpMyAdmin is a web tool that lets you look inside a database. Think of it as a spreadsheet viewer for your website's data.

WordPress keeps its web address in two settings, siteurl and home. If they are wrong, your site may redirect to the old address or show errors.

Before you start

Editing the database can break your site. Take a backup first. In phpMyAdmin, you can use the Export tab to save a copy of the database.

Steps

  1. Log in to DirectAdmin.
    Screenshot: Log in to DirectAdmin.
  2. Open phpMyAdmin. You can find it under Extra Features or in MySQL Management.
  3. If asked for a login, use your database username and password.
  4. In the left list, click the database that belongs to your WordPress site. If you are unsure which one, open wp-config.php in File Manager and look for DB_NAME.
    Screenshot: In the left list, click the database that belongs to your WordPress site. If you are unsur
    Screenshot: In the left list, click the database that belongs to your WordPress site. If you are unsur
    Screenshot: In the left list, click the database that belongs to your WordPress site. If you are unsur
    Screenshot: In the left list, click the database that belongs to your WordPress site. If you are unsur
    Screenshot: In the left list, click the database that belongs to your WordPress site. If you are unsur
  5. Find the table named wp_options. The start of the name may be different on your site, such as abc_options. Click it.
  6. Click Browse if the rows are not shown yet.
  7. Find the row where option_name is siteurl.
  8. Double-click the value in option_value, or click Edit on that row.
  9. Type your new address, for example https://example.com. Do not add a slash at the end.
  10. Click Go or press Enter to save.
  11. Do the same for the row where option_name is home.
    Screenshot: Do the same for the row where option_name is home .
  12. Open your site in a browser and test it. Clear the browser cache if you still see the old one.

Posts can store the old address inside their text. Use a plugin such as a search-and-replace tool to fix them. Always back up first. Avoid running a manual replace in phpMyAdmin on serialized data, because it can break settings.

Tip: Use https:// if your site has an SSL certificate. A mix of http and https can cause warnings.

Quick recap

  • WordPress stores its address in the siteurl and home rows.
  • Open phpMyAdmin and find the _options table.
  • Edit both rows to the new address.
    Screenshot: Edit both rows to the new address.
  • Back up the database before you change anything.
  • Test the site and clear your cache.