Guides‎ > ‎

Change domain

If you move your WordPress to another URL, your site will stop working. To fix it, follow these steps.

Quick fix

Edit wp-config.php


But this disables editing the fields in the admin settings

Proper fix

In your current theme functions.php file, add just after <?php

update_option('siteurl', '');
update_option('home', '');

Then sign into the admin page (it will update the database) and remove these two lines.

Through admin panel

Sign in as admin

Admin > Settings > General
  • Change "WordPress address (URL)"

  • Change "Site address (URL)"

If path changed

Edit .htaccess if your path changed

RewriteBase /new-path/
RewriteRule . /new-path/index.php [L]

More information