How to change wordpress multisite URL

→ Are you a new visitor? Please visit the page guidance for new visitors ←

How to change WordPress Multisite URL

I recently had a client that was trying to change WordPress Multisite URL to a new domain name, well for those that do not know already, WordPress usually hard code the URL inside the database, the table wp_options (wp_ being the table prefix of course).

Right so why so much fuss about the WordPress Multisite? 


 

To change WordPress Multisite URL you need to also know that the url it’s also saved inside the configuration file

  • wp-config.php

but also in two more sql tables:

  • wp_options
  • wp_blogs

Again, wp_ being the table prefix.

So basically to update the url of the WordPress Multisite URL you need to edit wp-config.php first and replace the part where highlighted:

The 3rd line needs to be updated to the new domain name.

Update WordPress URL in your database

Next, changing the url in your database, this is important, multisites require the database to use the correct url, especially for the table wp_blogs:

  1. Login to phpMyAdmin.
  2. Click the link to your Databases.
  3. A list of your databases will appear. Choose the one that is your WordPress database.
  4. All the tables in your database will appear on the screen.
  5. From the list, look for wp_optionsNote: The table prefix of wp_ may be different if you changed it when installing.
  6. Click on the small icon indicated as Browse.
  7. A screen will open with a list of the fields within the wp_options table.
  8. Under the field option_name, scroll down and look for siteurl.
  9. Click the Edit Field icon which usually is found at the far left at the beginning of the row.
  10. The Edit Field window will appear.
  11. In the input box for option_value, carefully change the URL information to the new address.
  12. Verify this is correct and click Go to save the information.
  13. You should be returned to your wp_options table.
  14. Look for the home field in the table and click Edit FieldNote There are several pages of tables inside wp_options. Look for the > symbol to page through them.
  15. In the input box for option_value, carefully change the URL information to the new address.
  16. Go back to the database tables list and click the small Browse button next to the table wp_blogs.
  17. Here, dependind on the number of sites you have installed, you need to update the field domain, with the new url.
  18. Verify this is correct and click Go to save the information.

That would be all at this point. Right now you should see your sites online and working with the new url. If you have any issues, do not forget to comment bellow.

Request an article ←