Knowledgebase article

How to change your WordPress site address (URL)

Moving WordPress from a temporary address to your real domain, from http to https, or from a sub-folder to the main domain? You need to tell WordPress its new address.

Option 1: In the dashboard (easiest)

  1. Log in to WordPress and go to Settings > General.
  2. Change WordPress Address (URL) and Site Address (URL), for example to https://yourdomain.com.
  3. Click Save Changes. You'll be logged out; log in again at the new address.

Option 2: If you can't reach the dashboard

Edit wp-config.php in cPanel > File Manager and add these lines above That's all, stop editing:

define( 'WP_HOME', 'https://yourdomain.com' );
define( 'WP_SITEURL', 'https://yourdomain.com' );

Update old links in your content

Your posts may still contain links and images with the old address. Use a plugin such as Better Search Replace to replace the old URL with the new one in the database. Always take a backup first.

Moving from a sub-folder to the main domain

If WordPress lives in public_html/wp and you want it at yourdomain.com, the simplest safe way is to use WordPress Manager by Softaculous to clone or move the installation, or a migration plugin. Or just ask Romeo to do it for you.

Afterwards

  • Go to Settings > Permalinks and click Save Changes to refresh links.
  • Clear any cache plugin and AccelerateWP cache.
  • Check that SSL is active for the new address.
Was this answer helpful?

Related articles

Still stuck? Romeo's got you.
Our support team replies around the clock, real humans who know your server.