The URL of our old WordPress MU (it is WPMU, not WordPress Multisite) installation with several blogs has changed. This URL change was updated directly in the DB in the wp_blogs
and wp_site
tables, and elsewhere. Now the blogs are accessible, but the permalinks of all posts across all blogs are like:
http://example.com/year/month/date/postname
Instead of the previous:
http://example.com/blogname/year/month/date/postname
The /blogname/
part is missing after the domain and so every blog's post links are broken (they don't load, obviously). When I visit the permalink structure settings page, or look at the permalink stored for each blog in wp_[blogid]_options tables
, it has the standard selection of /year/month/date/postname
.
Setting the specific blog name as a prefix in the custom permalink definition works for posts, but not for categories/tags. This is not how it was before (so explicitly setting the specific blog name as the prefix is not the solution).
Note:
To make the URL change work, the wp-config.php
file had to be changed as follows to add the new URL (without which it redirects to the old one):
//---> NewURL is the complete http and domain (can't post the link here)
define( 'WP_HOME', 'NewURL');
define( 'WP_SITEURL','NewURL');
define( 'NOBLOGREDIRECT', '' );
Questions:
- Where in the database, or configuration, is the part about using the
blogname
in the links (for each blog) just after the domain name stored? Is there any other location for this setting? - How do I eliminate the defines for
WP_HOME
andWP_SITEURL
fromwp-config.php
? I didn't need these with the previous URL. - The links for some of the blogs still point to the old domain. We don't have any caching plugins installed that could interfere. How can this domain change be done comprehensively?