The WordPress and Site Address for your site is the domain the site uses for all its links in the site’s source code: images, menu items, css, and js. When needing to change your site’s WordPress and Site Address, there are a couple ways this can be done. This article will explain both methods, as well as some common areas where users may run into trouble updating the WordPress Address.
UPDATING YOUR ADDRESS IN THE WORDPRESS ADMIN DASHBOARD
The first and most simple way to change your site’s WordPress and Site Address is to do this within your WordPress Admin Dashboard. To do this, you can log into your site at the wp-login.php page for your domain. Then click Settings > General. Here you will see two fields: WordPress Address and Site Address. These fields should be updated to the new address you wish to use. Both fields should always match, and should include http:// or https:// at the front. When you are finished making the changes, scroll down and click “Save”. This will log you out of the WordPress Admin Dashboard, since your site’s domain has now changed. Simply log in again, and you should now see your WordPress Admin Dashboard using your new domain in the address bar at the top.
UPDATING YOUR ADDRESS IN THE DATABASE
There may be times where you are unable to log into your site’s WordPress Admin Dashboard to make the needed change to the WordPress and Site Address. Not to worry! This can be done using the database (via phpMyAdmin) as well.
First, go to your User Portal at my.wpengine.com and choose the install to which you would like to log in. Then click “phpMyAdmin” from the menu at the left-hand side. From here you will have two options: wp_installname and snapshot_installname (where “installname” is the name of your WP Engine install).
Choose wp_installname, then wp_options. You may have a different prefix (other than wp_) for your tables shown here. If so, that’s okay! Just choose the one that shows yourprefix_options where your prefix is what your site’s tables are using instead of wp.
In the wp_options table, search for two options: “siteurl” and “home”. Here, you can change your Site Address and WordPress Address to what you’d like. As in the WordPress Admin Dashboard, these fields should always match.
UPDATING YOUR ADDRESS IN THE WP-CONFIG.PHP FILE
If when logging in to your WordPress Admin Dashboard, you see that the fields for WordPress and Site Address are “greyed out” or uneditable, this typically means that the wp-config.php file has these fields set. When these fields are set in the wp-config.php file it overrides what is showing in the database, and causes these fields to be uneditable. To correct this, you will need to edit your wp-config.php file via SFTP. For more information about how to get connected over SFTP, you can reference this article.
Once you are connected to your site over SFTP, you can edit the wp-config.php file. To make the fields in the WordPress Admin Dashboard editable again, you will want to remove the two lines which “define” the “WP_SITEURL” and “WP_HOME” like this:
When the lines have been removed, you can then edit the fields as normal in the WordPress Admin Dashboard.