How to Change WordPress Site URL and Home URL in cPanel

67 views
Short answer: Update site addresses directly via cPanel WP Toolkit dashboard, or open phpMyAdmin and edit the 'siteurl' and 'home' option values within the wp_options table.

Fix redirect loops and update WordPress Site Address (URL) and Home Address when switching domains or enforcing HTTPS.

Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup

Quick reference

WP Toolkit Method WP Toolkit > Website Card > Edit Site URL
Database Method phpMyAdmin > Database > wp_options table
Critical Values siteurl (WP core files) & home (public website address)

Steps

  1. Method 1: Change URL in WP Toolkit:
    • Open WordPress Toolkit in cPanel.
    • Click on your website instance to expand its settings card.
    • Click the pencil icon next to the website URL or click Manage in cPanel.
    • Update the domain or protocol (e.g., from http:// to https://) and confirm.
  2. Method 2: Change URL via phpMyAdmin:
    • Open phpMyAdmin and select your WordPress database.
    • Click on the wp_options table.
    • Locate the first two rows: siteurl and home.
    • Click Edit on siteurl and change the value to your new URL (e.g., https://yourdomain.com). Click Go.
    • Click Edit on home and set the exact same URL. Click Go.
  3. Method 3: Temporary Override via wp-config.php:
    • Open public_html/wp-config.php in cPanel File Manager.
    • Add the following two lines above /* That's all, stop editing! Happy publishing. */:
      define('WP_HOME', 'https://yourdomain.com'); define('WP_SITEURL', 'https://yourdomain.com');

Troubleshooting and tips

  • Trailing Slashes: Never add a trailing slash at the end of the URL (e.g., use https://example.com, NOT https://example.com/). A trailing slash breaks asset stylesheets.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket