Basic WordPress .htaccess

Posted On May 19, 2018

Kodewulf

Web developer and code junkie. Dabbling in just about anything that interests me.

When WordPress doesn’t run as clockwork and gives you a bit of a headache in the form of Internal Server 500 errors, it’s always helpful to be able to reset things to factory defaults, so to speak.The following snippet in your .htaccess file should reset things to a clean slate.

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

More adventures

Javascript sticky header magic

Some sticky header magic.  If a sticky header overlaps some content at the top of the page, this will move page content down a bit.

Google Event Tracking

Google gtag.js event code To be included in HEAD, replacing #### with UA identifier <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-#########-1"></script> <script>...

Share This

Share this post with your friends!