WordPress has two settings used to keep track of the site, WordPress Address (WP_HOME) to tell how to reach the home page and Site Address (WP_SITEURL) used when the home page is set to be different from the installation directory. These are also the settings you need to change when you need to migrate your WordPress website or change the location of WordPress installation, or simply set up a duplicate site for test purpose.
If that’s the case, here are 4 ways to change WordPress Address and Site Address.
1. Log into the admin dashboard.
2. Go to Settings > General
3. Change both WordPress Address and Site Address settings, click Save Changes button to save the changes.
This only works before the migration happened when you still have access through the old site URL.
1. Open wp-config.php file.
2. Add the following two lines to the file, preferably near at the top of the file.
define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com');
This works the best if you have access the site via FTP or SSH.
Since both settings are saved in the database, we can simply use phpMyAdmin tool or Update SQL command to update the setting directly against the wp_options table in WordPress database.
UPDATE wp_options SET option_value='http://example.com' WHERE option_name like 'home' UPDATE wp_options SET option_value='http://example.com' WHERE option_name like 'siteurl'
If you’re having issues accessing your WordPress dashboard, you can have WordPress automatically try to figure out what the correct WordPress Address should be using the RELOCATE flag in your wp-config.php file.
1. Open wp-config.php file.
2. Add the following line to the file, preferably near at the top of the file.
define('RELOCATE', true);
3. Now log into the admin dashboard, go to Settings > General, you will notice that WordPress has automatically populated the WordPress Address (URL) field for you, with the path to your WordPress files.
I personally haven’t had an opportunity to test the last method but will update if it happens differently in the real world.
If using Copilot right from the Taskbar isn't your thing, you should disable it. Even…
In an environment where standardizing things does matter, setting default fonts in Microsoft Office apps…
Wake-On-LAN is a networking standard that lets you wake up a computer from either a…
First of all, this is not to bypass a PDF file that requires a password…
Microsoft has been lurking about the idea of placing the Outlook navigation bar to the…
One colleague came up to me the other day asking me to take look at…