Is there a way to use custom permalinks in a multisite subdirectory install in a shared hosting envi

I have a multisite setup with a subdirectory as opposed to subdomain format. My hosting is on a linux shared hosting server.

I am getting a 404 error when you go to any of the urls that wordpress forces a /blog/ directory before the permalink in the url. (ie mysite.com/blog/postname...) All of the pages work fine with custom permalinks as well as the subdirectory sites. They can have custom permalinks and even domain mapping although I have that turned off right now until I fix this problem.

I am hoping there is a way to avoid jumping to a dedicated server or even a VPS until the site is more established, and since this seems to work for any single wp install I have on the same server as well as the subdir sites on this install, I'm thinking there is an easy fix and I just did something moronic in my .htaccess file or something.

Any help would be appreciated. Thanks in advance.

  • aecnu

    Greetings lmdwd,

    Thank you for bringing this to our attention and though you have already set your permalinks to custom which is fine, have you tried to just reset them by not changing them and clicking on the save changes?

    This more often then not fixes 404 errors on WordPress installations.

    Are you running caching on the WordPress installation in question by any chance?

    Are you using two completely different browsers for developing and testing? i.e. Firefox for developing and Chrome for testing and dumping the caching and cookies of the test browser before each test?

    Let us know.

    Cheers, Joe

  • lmdwd

    First let me address the questions:
    Did I resave the permalinks without changing them? - Yes, multiple times.
    Are you running caching? - No. I might in the future, but right now I am just trying to get the multisite functioning.
    Are you using 2 completely different browsers? - This one I am a little unclear on the reasoning behind the question but yes and no. I test and deploy on multiple browsers. I was always instructed this is considered best practice. However, having said that, my testing server is a Mac running MAMP and my live deployment is running Linux. With this particular app, I did do testing on a complete running website on the testing server, but the deployment was not a "copy" of the testing server. It was a new install as there was nothing but the ProSites plugin being used. I should restate here that this is completely platform independent. Seems to be more about the wordpress core than a plugin.

    Caching and cookies are also reset with each test.

  • aristath

    Hello there @lmdwd, I hope you're well today!
    Could you please follow the below steps and let me know if that helps:
    - Make sure that your .htaccess file is writable by the webserver
    - Go to Settings => Permalinks and change you permalinks to the default setting. Save your settings
    - Select the structure you previously had selected for your parmalinks and save again.

    This should force WordPress to rewrite your .htaccess file and fix anything that might be off there.

    If that doesn't work, could you please copy-paste the contents of your htaccess file here so that we may take a closer look?

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.