Title: Extra code for .htaccess
Last modified: June 11, 2025

---

# Extra code for .htaccess

 *  [hjakruijthof](https://wordpress.org/support/users/hjakruijthof/)
 * (@hjakruijthof)
 * [12 months ago](https://wordpress.org/support/topic/extra-code-for-htaccess/)
 * I received a warning about the auto-update of Wordfence. (free version) This 
   would not be possible without some extra code to be added to the .htaccess file.
   In there there should be a line that says “# BEGIN WordPress” ???? The code should
   be placed above this line.
   I can find no such line in the file. What am I missing
   here?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fextra-code-for-htaccess%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [11 months, 4 weeks ago](https://wordpress.org/support/topic/extra-code-for-htaccess/#post-18512022)
 * Hi [@hjakruijthof](https://wordpress.org/support/users/hjakruijthof/), thanks
   for your question.
 * The `# BEGIN WordPress` and `# END WordPress` markers are _commonly_ added to**.
   htaccess** by WordPress for things like enabling permalinks. I would double-check
   if it appears in another .htaccess file elsewhere in your WordPress site’s folder,
   just in case that’s the one your site is using instead.
 * We suggest looking for that line just to make sure customers add the Litespeed
   code in a suitable place, so if you have a blank file or other contents, you 
   may be able to place it near the top (above any `# Wordfence WAF` lines or references
   to `<IfModule mod_rewrite.c>`) and it still be functional. If you’re unsure, 
   your host may be able to assist.
 * Many thanks,
   Peter.
 *  Thread Starter [hjakruijthof](https://wordpress.org/support/users/hjakruijthof/)
 * (@hjakruijthof)
 * [11 months, 3 weeks ago](https://wordpress.org/support/topic/extra-code-for-htaccess/#post-18516597)
 * Thanks Peter! I’ll look for others .htaccess files.
 * If you don’t hear from me again (on this subject) I’ve managed to find the one
   I need.
 * Regards from the Holland,
   Henk

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

The topic ‘Extra code for .htaccess’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [extra code](https://wordpress.org/support/topic-tag/extra-code/)
 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)

 * 2 replies
 * 2 participants
 * Last reply from: [hjakruijthof](https://wordpress.org/support/users/hjakruijthof/)
 * Last activity: [11 months, 3 weeks ago](https://wordpress.org/support/topic/extra-code-for-htaccess/#post-18516597)
 * Status: not resolved