Sebelumnya silahkan dulu buka notepad atau program text editor lainnya seperti Dreamweaver, saran saya lebih baik pake Notepad++ bisa didownload di mari http://notepad-plus-plus.org/download. Bisa juga di edit langsung dari cPanel.
1. Buka wp-comment-post.php, cari kode:
$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; $comment_author_email = ( isset($_POST['email']) ) ? trim($_POST['email']) : null; $comment_author_url = ( isset($_POST['url']) ) ? trim($_POST['url']) : null; $comment_content = ( isset($_POST['comment']) ) ? trim($_POST['comment']) : null;
Lalu replace dengan kode ini:
$comment_author = ( isset($_POST['author']) ) ? trim(strip_tags($_POST['author'])) : null; $comment_author_email = ( isset($_POST['email']) ) ? trim(strip_tags(mysql_real_escape_string($_POST['email']))) : null; $comment_author_url = ( isset($_POST['url']) ) ? trim(strip_tags(mysql_real_escape_string($_POST['url']))) : null; $comment_content = ( isset($_POST['comment']) ) ? trim(strip_tags(mysql_real_escape_string($_POST['comment']))) : null;
fungsinya untuk menghilangkan spasi diawal dan diakhir input form, menghilangkan Tag HTML dan mengamankan dari SQL Inject.
2. Buka wp-config.php, dibawah kode:
<? php tambahkan kode ini:error_reporting(0); gunanya untuk menghilangkan pesan error yang muncul, agar username hosting tetap aman
- terus masuk ke cPanel, ganti permision wp-config.php menjadi CHMOD 400
3. Ubah .htaccess anda menjadi seperti ini:
># BEGIN WordPress
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteRule . /index.php [L]
</IfModule>
<files .htaccess>
order allow,deny
deny from all
</files>
<files /wp-config.php>
order allow,deny
deny from all
</files>
Options All -Indexes
Redirect 301 /wp-config.php http://fbi.gov
# END WordPress
4. Hapus/rename install.php5. Hapus/rename setup-config.php
6. Buka function.php yang ada di direktori theme yang sedang digunakan atau bisa via theme editor yang ada di dashboard wordpress. Setelah kode
<? php tambahkan kode ini:remove_action('wp_head', 'wp_generator');
7. Install plugin Lockdown WP Admin dan Wordpress Firewall, untuk konfigurasi pengaturannya silahkan cari sendiri ya






trik yang bagus mas. makasih ya tutorialnya.
BalasHapusBagus mas, tapi katanya file readme juga harus dihapus? Thanks
BalasHapusthanks gan...langsung ane coba
BalasHapussilahkan
BalasHapusWaduh ternyata ada celahnya juga yah, makasih mas, ane coba untuk uprek sesuai petunjuk mastah..:D
BalasHapuswah mantap makasih sharenya rnmembantu banget...:D
BalasHapuswah bagus nih. makasih mas infonyaa :)
BalasHapuskita bisa lebih pintar dari para hacker :D
BalasHapusMantap thanks tutornya... kemaren blog saya sudah ditembus tapi sukur sekarang sudah aman
BalasHapusTerima kasih tipsnya om gugun, dah tak praktekin neh, tpi klo wp-config.php-nya diganti CMOD jadi 400, error terus bos. akhirnya tak ganti 444 aja...
BalasHapusMantap! Share cara amankan akun twitter dong om, kaya disini: http://adaterus.com/single/read/752/resep-amankan-akun-twitter
BalasHapus