Changing domains for a WordPress site

If you are changing the domain of your WordPress site, keep in mind you also need to change domain names within your WordPress instance. Thanks, Cyon.ch.

Some notes as a reminder for myself:

Change WordPress site URL settings

In the WordPress admin, go to Settings ? General.
Edit the two fields:

  • WordPress Address (URL)
  • Site Address (URL)

Set both to your new domain (e.g. https://newdomain.com)

Save changes.

If you lose access or the site breaks, you can override via wp-config.php or directly in the database (see next steps).

Update references in the database

Many internal links, images, etc. still point to the old domain. You should replace those. Options:

Use a plugin like Better Search Replace to search old domain ? new domain.

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.