• Hello,

    if I build a WordPress Multisite installation, will all the subsites have their own htaccess files? Or will all the sites share one htaccess file?

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • if I build a WordPress Multisite installation, will all the subsites have their own htaccess files?

    No.

    Or will all the sites share one htaccess file?

    Yes.

    Remember, multisite subsite directories are virtual. There are no physical root directories for each virtual site.

    But I’m curious why you’re asking this question. What problem were you hoping to solve if you had individual .htaccess files per subsite?

    Thread Starter hans410947

    (@hans410947)

    Hello and thank you for your reply!

    I have a WooCommerce store that uses WPML to offer 2 different languages, a currency converter plugin to offer different currencies, and a VAT plugin to offer different VAT rates for customers from different EU countries.

    To make the site more efficient, I wanted to create a multisite that has one subsite for my own country, one subsite for the other EU countries, and one subsite for countries outside the EU. This way I would not need to use WPML or the currency converter plugin, and I would only need to use the VAT plugin for the subsite that is for the EU countries.

    But to make the VAT plugin work with my LiteSpeed cache plugin, I need to add some rewrite rules to the htaccess file, and I wanted these rewrite rules to only have effect on the EU subsite, and not the other sites.

    Thread Starter hans410947

    (@hans410947)

    Actually, when I think about it, a workaround would be if I can remove a mu-plugin on some of the subsites. This mu-plugin is used together with the htaccess rewrite codes.

    The mu-plugin is found in this folder: public_html > wp-content > mu-plugins

    Is that folder unique for every subsite, or do all the subsite share the same folder?

    • This reply was modified 1 year, 2 months ago by hans410947.

    Actually, when I think about it, a workaround would be if I can remove a mu-plugin on some of the subsites. This mu-plugin is used together with the htaccess rewrite codes.

    The mu-plugins (must use) plugins folder is special in this sense: all plugins placed in this folder are automatically activated and cannot be managed (activate/deactivate/delete) from the admin dashboard (hence the “must use” name).

    And since this is a Multisite network, any plugin placed in this mu-plugns folder is automatically activated across the entire network. There’s no (built-in) way to deactivate a plugin placed here on individual subsites.

    If you don’t want a plugin to be activated on all subsites, simply put the plugin in the plugins folder, and ONLY activate it on the subsites that you want the plugin activated on.

    Is that folder unique for every subsite, or do all the subsite share the same folder?

    No, and yes.

    Thread Starter hans410947

    (@hans410947)

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Individual htaccess files for Multisite subsites?’ is closed to new replies.