Ten Tips To Make WordPress Hack-Proof - Page 2

* Truth is, I prefer HeadSpace to the All In One, but that's another story.

4. Delete "Admin" User  Just to make hackers work harder, bin this. Create a new user with administration rights, and give the user a nickname (for public display) that is not the same as the username. Then log out, log back in as the new user, and delete the original "admin" user.

5. Use a Stronger Password  Bit obvious, this one. Mix it up with letters, digits and special characters, upper and lower case. I use RoboForm to remember (and encrypt) my passwords, and that's free.

6. Hide Your WordPress Version  From your theme's folder, open "header.php", search for the line...

<meta name=”generator” 
content=”WordPress <?php bloginfo(’version’); ?>” />

...and delete it.  It has no useful purpose.


7. Ensure WordPress Database Errors Are Turned Off  In recent WordPress versions, they are turned off by default. So upgrade.

8. Remove WP ID META Tag  Delete this tag from the WordPress core. After you activate and run wp-security-scan, this is done automatically.

9. Create a .htaccess File in "wp-admin/"  Open a new text file and paste this...

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

Save the file as .htaccess and upload it to your "wp-admin/" folder, i.e., to http://myblog.com/wp-admin/

10. Hide Your Plugins  If you're not sure whether they're hidden or not, navigate to http://myblog.com/wp-content/plugins. If you see a 404 error page, they're hidden. Otherwise, you'll see them listed. In that case, copy the following into a new .htaccess file, adding the file to your wp-content/ folder...

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# Prevents directory listing
IndexIgnore *
# END WordPress

Some Web hosts don't allow you to administer .htaccess files. If that's the case, instead of using a .htaccess file to hide the list of plugins, create an index.html file. You can write something about restricted access in there, if you like. Either way, this file will prevent a plugin listing.

Now navigate to http://myblog.com/wp-content/plugins. They should be hidden.

After You're Done

Just to be thorough, and because a few things have changed...

  • Backup your files again, using your ftp client.
  • Backup your database again, using wp-phpmyadmin.

That's it. Your blog is more secure, and way less hackable. Go make content!

Comment below, or e-mail me with questions and tips.

Page 1 — Page 2
Spread the word
Bookmark and Share
Profile image for the_guv

Article Author: the_guv

Spiel includes web stuff for the BBC, broadcasting for Bloomberg and MTV, plus a bunch of radio.

At http://www.guvnr.com I blog about getting the most of of the web, both to make it and enjoy it. That includes a bunch of video tutorials.

Visit the_guv's author pagethe_guv's Blog

Read comments on this article, and add some feedback of your own

Article comments

  • 1 - Relevant Trafik

    May 29, 2009 at 1:26 pm

    This is a good read and well worth the effort to employ. Also let me add that changing the "powered by Wordpress" to something different is also a good tactic to use. Thanks for posting this.

  • 2 - My Blogging School

    May 29, 2009 at 2:54 pm

    Part of the problem is the widespread use of Fantastico for installing Wordpress in the first place. I will be updating my Fantastico Fix report to include the additional plugins you have mentioned, as well as the tweaks for securing Wordpress regardless of the installation method.

    Good stuff!

  • 3 - cfazendin

    Jun 06, 2009 at 7:13 pm

    Besides removing the admin account, you should also have each account use a different account name and nickname. Then set their posts to display nickname. Can't hack an account name that doesn't exist.

  • 4 - the_guv

    Jun 09, 2009 at 4:08 pm

    tx folks,

    appreciate those comments and tips.

    ..pleased you like my article.

    the_guv

  • 5 - Mike

    Jul 14, 2009 at 5:32 pm

    That makes so much sense. admin is too easy - make it hard to figure out what the admin username is! Brilliant! Thanks!

  • 6 - Joe

    Jul 17, 2009 at 4:13 am

    Hey these tips worked! Thanks

  • 7 - Cool K

    Jul 20, 2009 at 4:13 pm

    Thanks for the tips! I will try them out.

  • 8 - TV Surfing Solutions

    Jul 25, 2009 at 11:52 pm

    Some brilliant information, these tips are great, something many should follow. Thanks

  • 9 - Dave Metz

    Jul 28, 2009 at 8:41 pm

    Wow, so simple and yet completely out-of-the-box. I will definitely follow this great advice. Many thanks.

  • 10 - Lyle

    Aug 13, 2009 at 12:47 pm

    Excellant information. Many of us don't do these inportant tasks. I will be more aware in the future.

  • 11 - Lyle

    Aug 16, 2009 at 7:45 pm

    Very good I will keep that in mind. I thank you.

  • 12 - Article Directory

    Aug 17, 2009 at 2:51 pm

    Great tips and advice for WP bloggers. As said above, some I would never think of so I'm off to do it right now! :)

  • 13 - Chris Beaumont

    Aug 23, 2009 at 9:35 pm

    "Blog Security" is one of the top security blogs out there keeping an eye on all things blog security and WordPress.

    They’ve just released two great articles WordPress fans need to check out.

    First is news of a video and blog post by Guvnr called “10 Tips to Make WordPress Hack Proof. The effort involved tips from BlogSecurity’s popular WordPress Security Whitepaper, inspiring them to update and improve it soon.

    Enjoy.

  • 14 - the_guv

    Aug 24, 2009 at 4:13 am

    tx all ..

    appreciate your kind words.

    and am glad you found this Guvnr.com tutorial handy.

  • 15 - Twitter Trends

    Sep 01, 2009 at 12:34 pm

    Great WP tips!

  • 16 - Larry C.

    Sep 04, 2009 at 12:37 am

    Excellent Article, will be doing this in the AM. thanks much for the good security topic.
    Larry

  • 17 - the_guv

    Sep 14, 2009 at 4:51 am

    @TwitterTrends and LarryC

    pleased you like .. best to you.

  • 18 - Mike

    Oct 12, 2009 at 8:07 am

    I will have to try this out. Security is the one weakness I see in Wordpress

  • 19 - Zedd

    Oct 12, 2009 at 8:10 am

    Great article. I will check this out soon.

  • 20 - Bob N

    Nov 05, 2009 at 5:29 pm

    Thanks, Guv. Followed a few of your tips - hope I don't get hacked again! Thanks for writing this up.

Add your comment, speak your mind

Personal attacks are NOT allowed.
Please read our comment policy.
Please preview your comment.

blogcritics lists for Nov 29, 2009

fresh articles Most recent articles site-wide

fresh comments Most recent comments site-wide

most comments Most comments in 24hrs

top writers Most prolific Blogcritics for October

top commenters Most prolific Commenters in 24 hrs