Support » Networking WordPress » Pretty Permalinks for subsites not working for subdomains

  • Resolved Ash Durham


    Hey Guys,

    Hoping I’ve missed something stupid.

    I have a multisite setup that I’ve moved from a development server using subfolders to the live server that I need to use subdomains.

    I have setup the wildcard subdomain in cPanel, updated the DB accordingly and changed the required values in wp-config.

    This is all working fine, admin is all good, home pages of each site is fine and CSS all sweet. Click on a link and it drops the subdomain and returns back to the main site.

    I turn off pretty permalinks and sites work like a well oiled machine.

    .htaccess is as per what the network settings state they should be.

    What am I missing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Can you be more explicit on WHAT you did to the DB? There’s more than just a search/replace to change it out.

    Hi Mika,

    Yep, Fully understand that. Ran the standard find and replace to just update the database with the live URL. Then proceeded to update the wp_blogs and wp_site tables. This then got the site working as expected without pretty permalinks.

    This just twigged a thought to check if mod_rewrite is even enabled and it doesn’t seem to be which could answer a few issues 😉 Back to basics.

    I’ll keep the post updated with the result.

    Just an update on how things are running so far. It was determined that mod_rewrite was infact enabled, however it now appears to be how the wildcard subdomain was setup.

    Still waiting to hear from support.

    Ran the standard find and replace to just update the database with the live URL.

    That was probably the problem.

    Data is serialized, so you have to use something like this:

    HI Mika,

    Cool script, will certainly use that in future, however in this case, it just got me back to where I was before the attempt. Everything working as expected except when using pretty permalinks.

    If the serialised data was corrupt, the site wouldn’t have run in the first place and would have provided me with a php error, none of which occurred. Valid try though.

    Since the subdomain homepages are working but the subpages off them are not, I still suspect it has something to do with the wildcard subdomain setup. Wouldn’t be the first time cPanel sets the subdomain up with issues.

    I’ll keep you posted.

    If the serialised data was corrupt, the site wouldn’t have run in the first place

    Incorrect. It would have run, just weirdly (like … permalinks not working 😉 )

    Time to go to the server level and see if it’s got AllowOverride set to All or Options All.

    Hey Mika (and anyone else looking for a solution to this issue),

    You may well have been right as after much digging and testing, we couldn’t get the subpages of a subdomain working at all. All rules and everything else was right. Modifying the database with that script or otherwise wouldnt get it working.

    The last resort was to wipe the server (of the site files and database), put a fresh install of WP Multisites using subdomains from the get go then export/import each subsite from development to production.

    Slightly time consuming but easy a pie and we now have a perfectly working subdomain based multisite.

    Moral of the story: If switching from subdirectories to subdomains or visa versa, just do a fresh install and import rather than fiddling with the existing install – cleaner, safer, eventually quicker!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Pretty Permalinks for subsites not working for subdomains’ is closed to new replies.