Here are a couple easy steps you can take to prevent your Wordpress Blog from being “hacked”.
1) It is easy for someone to view your themes and plugins folders if you don’t do this one little thing.
Launch your favorite text editor and save a new file as index.php.
Then paste the following code into it:
<?php
// Redirect to specified URL
$URL = “http://www.yoursite.com/”;
header( “HTTP/1.1 301 Moved Permanently” );
header(”Location: $URL”);
exit();
?>
Edit www.yoursite.com to the page you want the errant visitor to be redirected to.
Then upload that index.php file to all the directories that don’t have an index.* or default.htm file in them.
If you don’t know how to upload files or would like assistance with your Wordpress site maintenance, I can provide that service for you at reasonable rates.
(Thanks to Katherine Reschke for bringing the issue to my attention.)
2) Another quick fix to ward off hackers is the following.
In your “header.php” file is a line that looks like this:
<meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” /> <!– leave this for stats –>
You should comment it out or remove it to prevent hackers from exploiting security holes in older versions of Wordpress.
This his how it would look if commented out:
<!– <meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” /> –> <!– leave this for stats –>
I’m available for a free 1/2 hour consultation by phone if you have any questions about your website or Wordpress blog.
[tags]Wordpress Security, index.php[/tags]
Related posts:
- Meta Tags For Google Keyword Ranking – by Jerry West Here’s an article from SEO Expert, Jerry West, that I...
- How To Disable NoFollow (and use DoFollow) for Comments on Your WordPress Site To disable nofollow in your WordPress comments, use one of...
Related posts brought to you by Yet Another Related Posts Plugin.


2 responses so far ↓
1 Katherine Reschke // Feb 13, 2008 at 6:21 am
Great work there Jerry
2 StulgeOvette // Aug 3, 2008 at 6:30 am
Brilliant!
Leave a Comment