I am having multisite issues

I was trying to convert my single site to Multisite. When installing, it didn't give the radio button option to choose which one. Rather, it became subdomain multisite automatically. And I proceeded. I changed that to a subfolder by changing the .htaccess code and wp-config.php lines. Now my subsite dashboard is loading fine, but subsite front-end pages are missing assets.

  • Predrag Dubajic

    Hey Micha,

    Hope you're doing well :slight_smile:

    I had a look at your installation and even though the settings look correct the issue is with your subsites using wrong URL to pull WordPress files, causing them not to load and break your site.

    For example, your WP files should be loaded from yourdomain.com/wp-includes/somefile.php but on your installation it actually adds subsite name as well so the URL looks like this yourdomain.com/subsite/wp-includes/somefile.php.

    WP Engine has it's own way of installing multisite so it could be related to that, it's possible that it needs some additional settings in your account in order to change network type but I'm not that familiar with it to know where or what needs to be changed :slight_frown:

    My suggestion is to get in touch with WP Engine support and let them know about the issue with subsite files being pulled from wrong location and they should be able to figure out more easily what exactly is causing it.

    Let us know what response you were able to get from them.

    Best regards,
    Predrag

  • Micha

    Predrag,

    Thanks for the reply. However, the pattern you mentioned is normal. I have a lot of multisites I manage, some on WP Engine, some on other hosts, and all follow this. I am looking at one example now and inspected the code on a live sub-site. I got a pattern like this for a .js file: http://domain.com/sub-site/wp-includes/js/wp-emoji-release.min.js and that file works properly. This example is one hosted on Cloudways and was a manually created multi-site and has hundred of sub-sites all which function properly.

    While I know that the file is really at http://domain.com/wp-includes/js/wp-emoji-release.min.js something in the rewrite rules allows this to work and it does this in every single multisite I manage. This is why this is odd to me for this one not to work.

    In this example, and every other site of mine I checked, this same patterns holds true for all files.

    Please advise. Thanks!

  • Adam Czajczyk

    Hello Micha,

    When you're switching the install from sub-domain to sub-folder or other way around, it might also be necessary to update URLs in the database. Those URLs are not automatically tweaked but they must reflect the current site's configuration.

    Did you try this already? I'm asking because you didn't mention that in your post. You could use this plugin for that https://wordpress.org/plugins/search-and-replace/ or this standalone script https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Best regards,
    Adam

  • Micha

    Adam,

    I didn't need to switch anything because I didn't make a switch, technically. When I went to install, the multisite installer only gave the option of sub-domain. However, I didn't actually insert that sub-domain code into my wp-config.php or .htaccess. Instead, I used the correct code as per the regex for the sub-directory site. Since no sub-sites where made until after that, there is no need to search and replace URLs.

    Also, it's the not the site's URLs that aren't working. They work fine. It's .css, .js, etc. that load with plugins, theme, and core that aren't loading.

    Thanks for the thought though.

  • Micha

    Adam,

    I didn't need to switch anything because I didn't make a switch, technically. When I went to install, the multisite installer only gave the option of sub-domain. However, I didn't actually insert that sub-domain code into my wp-config.php or .htaccess. Instead, I used the correct code as per the regex for the sub-directory site. Since no sub-sites where made until after that, there is no need to search and replace URLs.

    Also, it's the not the site's URLs that aren't working. They work fine. It's .css, .js, etc. that load with plugins, theme, and core that aren't loading.

    Thanks for the thought though.

  • Predrag Dubajic

    Hi Micha,

    Hmm, yes, I got a bit confused above due to files not being accessible on those URLs, sorry about that.

    I did check your site now and it looks like files are now properly loaded and your frontend is loading as well.
    Console is empty now, no missing files are shown and if I try accessing something like yourdomain.com/testone/wp-includes/js/wp-emoji-release.min.js it will open the file properly.

    Did you manage to figure it out in the meantime?

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.