Meningkatkan Security WordPress Melalui Htaccess
Security WordPress
WordPress merupakan salah satu CMS (Content Management System) open source yang sangat populer di kalangan pengguna website. Kemudahan operasioanal serta beragam fitur gratis yang ditawarkan oleh para plugins developer membuat banyak yang memilih wordpress sebagai engine website mereka.
Karena sifat-nya yang open source, wordpress menjadi sasaran serangan hacking dengan memanfaatkan celah keamanan pada plugin yang terpasang. Para pemilik website berbasis wordpress sangat disarankan untuk melakukan update versi wordpress dan plugin dengan versi terbaru.
Salah satu cara dasar untuk mengamankan webiste berbasis wordpress adalah melalui modifikasi file .htacces defaultnya. Simak beberapa contoh modifikasi .htaccess untuk lebih meningkatkan keamanan website wordpress Anda.
[php]# 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
[/php]Script untuk melindungi file wp-config.php
[php]# protect wpconfig.php
<Files wp-config.php>
order allow,deny
deny from all
</Files>
[/php]Script untuk melindungi file .htaccess itu sendiri
[php]
<Files ~ “^.*.([Hh][Tt][Aa])”>
order allow,deny
deny from all
satisfy all
</Files>
[/php]Script untuk melindungi file dari script injection
[php]# BEGIN protect WordPress from script injections:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
# END[/php]Lokasi File : Letakkan htaccess-nya di dalam folder root atau public_html
Sekian tutorial untuk pengamanan website wordpress melalui .htaccess. Semoga bermanfaat 🙂
Tags: htaccess, security, Tutorial Website, wordpress