Defining the primary domain for my site

WordPress Settings

The siteurl- and home-settings in WordPress determine the address at which your site is displayed. During the development phase, sites usually use an address of the format example.fi-c.seravo.com, but when the site is published, Seravo's automation changes it to the address specified as the main domain for the site.

Sometimes, however, it may be necessary to change the primary domain of the site later on. In such cases, the change can be made through the WordPress Dashboard. In Seravo Plugin, from Tools -> Database tab, you can find the Search and Replace tool, which allows you to replace the domain directly in to the database. It is necessary to first execute a dry run to see how many changes are to be made, after which you can execute the replacement run itself.

You can check that the changes have taken effect from Settings -> General tab, where the address should have been changed to the fields reserved for it.

Changes can also be made from the command line with the wp-cli tool. Before the actual replacement run, it is recommended to run a dry run, which shows the amount of the replaceables and the database tables affected:

$ wp search-replace '//seravo.fi' '//seravo.com' --all-tables --dry-run

After the dry-run, you can execute the replacement run:

$ wp search-replace '//seravo.fi' '//seravo.com' --all-tables

After the changes have been made, it is recommended to clear the site cache:

$ wp-purge-cache

You can check the success of the address change with the following command:

$ wp option get siteurl && wp option get home

Defining the site domain in multisite

Changing the domain in multisite is slightly different than in basic WordPress installation. For configuring and mapping domains in multisites, please refer to our multisite instructions.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.