Set WordPress to ignore a File Path Updated on March 4, 2022 by InMotion Hosting Contributor 1 Minutes, 2 Seconds to Read Sometimes, you need to allow access to a file or directory but don’t need a subdomain. For example, you may upload a file or folder to your public_html directory, but WordPress may show a 404 error when attempting to access its file path. In such situations, you can create a rewrite condition within your .htaccess file to force your WordPress website to ignore the file path of that file. This would allow a file – e.g. domain.com/file.html – to display as is instead of embedded as part of the parent WordPress website. Edit WordPress to Ignore a File Path Log into SSH or cPanel File Editor. Navigate to your WordPress root directory.Open your website .htaccess file.Below is the default WordPress .htaccess file: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Add the following above the RewriteCond lines, replacing file with the file path to your saved files: RewriteCond $1 !^(/file) Save your changes. You should now be able to visit the URL for that HTML file without your WordPress website attempting to integrate it as part of the website. Share this Article InMotion Hosting Contributor Content Writer InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals! More Articles by InMotion Hosting Related Articles How to Create an Admin Account in WordPress via MySQL Create a Footer for WordPress How to Create a Gallery in WordPress without a Plugin How to Disable the WP-Cron (wp-cron.php) in WordPress How to Change Your Site URL in Your WordPress Admin Dashboard W3 Total Cache – Guide to WordPress Caching WordPress – Changing the Site URL and Home Settings How to Globally Change the Font in WordPress How to Install WordPress using Softaculous Cleaning Up Old Post Metadata in WordPress