Avoid hacking in WordPress from .htaccess • WordPress Help

The file .htaccess is the first barrier that you can use in a system based on Linux servers with Apache, because it has a good amount of rules that we can apply and, thanks to that, and as it is today's case, protect WordPress from hackers .

The following code, added to the file .htaccess of your installation (hidden file located in the root folder) will avoid a lot of common systems of inject code and hack WordPress .

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22 [19659026] RewriteEngine On

# without access to proc / self / environ

] RewriteCond % { QUERY _ STRING } proc / self / ] environ [ OR ]

# block any script that try from establish a value mosConfig through through from a URL

RewriteCond % [19659035] {} STRING }

mosConfig _ [ to - zA - Z _ ] { 1 21 } ( = | ] 3D ) [ OR ]

# block any [19659027] script that try of to place you code encoded base64 _ encode to via of a URL

RewriteCond % { QUERY _ STRING } base64 _ encode . * (. * ) [ OR ]

# [1965902] 7] blocks any script that includes the tag