Wordpress - Remove WordPress theme from a specific page

There is, in fact, a way to do it without messing with the theme, let's say your WordPress is on public_html/your_site, now you want to create an HTML page that is on your_site.com/mypage, so instead of creating a page or post called mypage on your WordPress dashboard you are going to create a mypage.html and upload it to public_html/your_site, in case you want to get rid of the .html you can simply hide it from your .htaccess doing something like:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]

Keep in mind any tracking code you have on your WordPress, for example, Google Analytics, if you are using things like that you will have to add those codes to your HTML page as well.


Just make a directory on the highest level and put your html file there. If you call it directly, you will bypass WordPress. Beware that this also means the file won't be found using WP's search function. Basically, for WP, it will be an external page.