Accessing static files and subdirectories in WordPress root folder

I’ve got WordPress running in my main directory and I’m having some weird issues. I put a file called index.html in the same folder where WordPress is installed, but when I try to visit Example Domain, it just shows me the “No posts found” message from my custom theme.

I need help with a few things:

  1. How do I access HTML files that are sitting in the WordPress root folder?

  2. Can I install another WordPress site in a subfolder while keeping the main WordPress installation in the root?

  3. Is it possible to create new folders inside the WordPress root directory and put files there that I can access through my browser?

I’m pretty confused about how WordPress handles URLs and file access. Any advice would be great!

WordPress’s URL structure can indeed complicate access to static files like your index.html. The issue arises because WordPress rewrites URLs by default to serve content dynamically, which is why you’re encountering the ‘No posts found’ message. To resolve this, you can modify the .htaccess file located in your root directory. Specifically, you can add a rewrite condition that allows certain file types to bypass WordPress handling. Just insert ‘RewriteCond %{REQUEST_FILENAME} !.(html|css|js)$’ before the line containing ‘RewriteRule ^index.php$ - [L]’. As for your other questions, installing another WordPress site in a subfolder is perfectly fine and will not interfere with your main installation. Additionally, you can create new folders in the root directory as long as they don’t conflict with existing WordPress paths.

yep, i ran into this too! u can change the .htaccess rules to let those static files work. just be careful not to mess anything up, or renaming the files might help too. i had to tweak mine a bit and it worked!

WordPress’s permalink structure is hijacking your requests. When you hit index.html, WordPress thinks it’s a page slug and hunts for a matching post or page. Can’t find one? You get that ‘No posts found’ error. I’ve fixed this by creating a symbolic link or just renaming the HTML file to something like ‘static-index.html’ - usually dodges the rewrite rules completely. For subfolders, WordPress typically leaves directories alone if they’ve got their own index files. Drop an index.html in a new folder and it’ll work without messing with .htaccess. I’m running multiple WordPress setups this way with zero conflicts. The trick is knowing WordPress only processes requests when it can’t find actual files on the server.