Title: Problem with SubFolder install
Last modified: January 15, 2024

---

# Problem with SubFolder install

 *  Resolved [Gerald](https://wordpress.org/support/users/gerital/)
 * (@gerital)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-subfolder-install/)
 * I have your plugin working correctly on a SubFolder network with the main site
   accessible at [http://127.0.0.1](http://127.0.0.1) and the translation at [http://127.0.0.1/es](http://127.0.0.1/es)
 * Now I need to move it into a folder with the main site at [http://127.0.0.1/mysite](http://127.0.0.1/mysite)
   and the translation at [http://127.0.0.1/mysite/es](http://127.0.0.1/mysite/es).
   Should that be possible?
 * Translations are linked correctly, but the main site [http://127.0.0.1/mysite/es](http://127.0.0.1/mysite/es)
   and all subpages do load with a lot of 404 as referenced files (like [http://127.0.0.1/mysite/es/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1](http://127.0.0.1/mysite/es/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1))
   can’t be found).
 * Here are the files and database tables I changed (in bold) in order to get it
   working, but without the described problems:
 * wp-config.php:
 *     ```wp-block-code
       /* Multisite */
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', false );
       define( 'DOMAIN_CURRENT_SITE', '127.0.0.1' );
       define( 'PATH_CURRENT_SITE', '/mysite/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       ```
   
 * .htaccess:
 *     ```wp-block-code
       RewriteEngine On
       RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
   
       # add a trailing slash to /wp-admin
       RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
   
       RewriteCond %{REQUEST_FILENAME} -f [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^ - [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
       RewriteRule . index.php [L]
       ```
   
 * wp_site:
 *     ```wp-block-code
       domain	path
       http://127.0.0.1	/mysite/
       ```
   
 * wp_sitemeta:
 *     ```wp-block-code
       site_id	metakey	metavalue
       1 		siteurl	http://127.0.0.1/mysite/
       ```
   
 * wp_blogs:
 *     ```wp-block-code
       blog_id	site_id	domain	path
       1	1	127.0.0.1	/mysite/
       4	1	127.0.0.1	/mysite/es/
       ```
   
 * wp_options:
 *     ```wp-block-code
       option_name	option_value
       siteurl	http://127.0.0.1/mysite
       home	http://127.0.0.1/mysite
       ```
   
 * wp_4_options:
 *     ```wp-block-code
       option_name	option_value
       siteurl	http://127.0.0.1/mysite/es
       home	http://127.0.0.1/mysite/es
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-subfolder-install/#post-17344120)
 * It should be possible. MSLS stores the id of the linked contents and not their
   path.
 * I can imagine a problem with the permalinks. Are they permalinks flushed? Often,
   visiting the permalinks settings (which flushes them automatically) is enough…
 *  Thread Starter [Gerald](https://wordpress.org/support/users/gerital/)
 * (@gerital)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-subfolder-install/#post-17344567)
 * Thanks for your answer – and for your great plugin, by the way.
 * I had a look at permalinks and on cache, but it doesn’t solve the problem. It
   seems to be something with the network itself going wrong as all the files loaded
   on the second site do include the _/es_ folder (like [http://127.0.0.1/obsip/es/wp-content/uploads/sites/4/2023/12/test.jpg](http://127.0.0.1/obsip/es/wp-content/uploads/sites/4/2023/12/test.jpg)),
   but actually shouldn’t as they work like [http://127.0.0.1/obsip/wp-content/uploads/sites/4/2023/12/test.jpg](http://127.0.0.1/obsip/wp-content/uploads/sites/4/2023/12/test.jpg)
 * So I think that doesn’t have to do anything with your plugin as the sites itself
   are linked fine, but just don’t load any related resources. So I’m going to reread
   out the WordPress multisite resources in case I missed anything. The strange 
   thing is just that everything works fine without the _/mysite_ subfolder.
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-subfolder-install/#post-17344662)
 * Thank you! Also for pointing that out. Keep us posted, please!
    -  This reply was modified 2 years, 4 months ago by [Dennis Ploetner](https://wordpress.org/support/users/realloc/).
 *  Thread Starter [Gerald](https://wordpress.org/support/users/gerital/)
 * (@gerital)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-subfolder-install/#post-17351456)
 * Finally could get it work following this guide from back in the days: [https://paulund.co.uk/wordpress-multisite-with-nested-folder-paths](https://paulund.co.uk/wordpress-multisite-with-nested-folder-paths)
 * That actually happens because of a limitation of WordPress Multisite, by default
   it doesn’t work for sub-sub-folders like _[http://127.0.0.1/mysite/es](http://127.0.0.1/mysite/es)_
 * So basically you have to add a _sunrise.php_ dropin to _wp-content_ folder and
   modify one line at _.htaccess_. With that changes everything works fine now.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem with SubFolder install’ is closed to new replies.

 * ![](https://ps.w.org/multisite-language-switcher/assets/icon-256x256.png?rev=
   2793358)
 * [Multisite Language Switcher](https://wordpress.org/plugins/multisite-language-switcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-language-switcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-language-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-language-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-language-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-language-switcher/reviews/)

## Tags

 * [subfolder](https://wordpress.org/support/topic-tag/subfolder/)

 * 5 replies
 * 2 participants
 * Last reply from: [Gerald](https://wordpress.org/support/users/gerital/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-subfolder-install/#post-17351456)
 * Status: resolved