Connect with us

Tips & Tricks

WordPress Security Hacks

Published

on

Hi guys this is my first post on wpcult the great site Austin built.  Hope you guys find it usefull.

If you run a blog using the wordpress software then your blog is a target to hackers.  Below I will list some hacks and just how they can help you keep your business/site safe.

The following is  code to Block Bad Queries and protect your blog from malicious URL Requests.

Place the following code into a text file and name it what ever you like for example blockbadqueries.php upload it to your plugin folder and activate it in your wordpress admin just as you would any other Plugin

<?php
/*
Plugin Name: Block Bad Queries
Plugin URI:
http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/
Description: Protect WordPress Against Malicious URL Requests
Author URI:
http://perishablepress.com/
Author: Perishable Press
Version: 1.0
*/
global $user_ID; if($user_ID) {
  if(!current_user_can(‘level_10’)) {
    if (strlen($_SERVER[‘REQUEST_URI’]) > 255 ||
      strpos($_SERVER[‘REQUEST_URI’], “eval(“) ||
      strpos($_SERVER[‘REQUEST_URI’], “CONCAT”) ||
      strpos($_SERVER[‘REQUEST_URI’], “UNION+SELECT”) ||
      strpos($_SERVER[‘REQUEST_URI’], “base64”)) {
        @header(“HTTP/1.1 414 Request-URI Too Long”);
 @header(“Status: 414 Request-URI Too Long”);
 @header(“Connection: Close”);
 @exit;
    }
  }
}
?>

 This Great plugin was made by Jeff Starr of Digging into WordPress

 

 

Protecting your blog with .htaccess 

.htaccess files have lots of possibilities. below is some code that will help protect your wordpress from modification of _REQUEST and/or GLOBALS and scripts injection.

 This is real simple just paste the following code into your .htaccess file. Always make a backup of your .htaccess before editing, better to be safe.

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]

 

Thanks to Oussama for this great hack

Plugins

Add the twittar plugin for WordPress w/ comment threading

Published

on

I talked about the Twittar plugin in a previous post. But learned that the read me text file was only useful for installing the necessary php code into WordPress themes that don’t have comment threading enabled.

Since most new themes past version 2.7, pull the comments section from functions.php file, that is where you have to edit the avatars in order to show the twittar settings.

First open you functions.php, and look for a line of code that says:

function custom_comment()

This is where your new comments are pulled from when you have the threaded comments enabled.

Now just find <?php echo get_avatar( $comment, $args['avatar_size'] ); ?> & replace with <?php twittar(70, "", "", "avatar avatar-70 photo", 1, "R"); ?>. Keep in mind that you will need to edit the Twittar setting to fit your site.

Continue Reading

Tips & Tricks

Styling your ordered & unordered list items into 2 columns

Published

on

In a previous post I showed you how to create a custom widget, then I showed you how to create a widget for your monthly archives, and limit the month’s that show. I am showing the past 4 months in my widget at this time.

One of my readers: Alex asked:

How did you make the archives widget to show the dates separately into two columns?

Now I will show you a CSS trick to create this effect:

First we will give the unordered list a width of 100%:

ul#archives {
	width:110%;
	}

Then we will style the <li> nested inside.

ul#archives li {
	display:inline;
	float:left;
	width:120px;
	}

And that is it. Please make sure that you clear the float after your closing </ul>.

Continue Reading

Tips & Tricks

Changing your feedbuner form to work with Google

Published

on

A lot of you may be using a email form to gather email’s via Feedburner. I am use that by now you know Google has decided to dump feedburner.com and move all feeds through Google Proxy or Feeburner2 which is a Google Server. Here is the new form you will need to put on your site to get new email address’s:

<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" 
onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=YOUR_FEED_NAME', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
    <p class="form-label">Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p>
    <input type="hidden" value="YOUR_FEED_NAME" name="url"/>
    <input type="hidden" value="<?php bloginfo('name') ?>" name="title"/>
    <input type="hidden" name="loc" value="en_US"/>
    <input id="submit" type="submit" value="Subscribe" />
</form>

That’s it, just be sure to change YOUR_FEED_NAME to your feed name. For example, my feed is now http://feeds2.feedburner.com/WPCult. Where WPCult is now my ID.

Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Awkwafina Net Worth, Bio, Wiki

Awkwafina Net Worth, Bio, Wiki

Awkwafina net worth Awkwafina is an American artist; She is a comedian, TV personality, actress, and a rapper. Her net worth is $4 million. She was born as Nora Lum in New York City and grew up in Forest Hills, Queens, area of the city. When she was in high school, she played trumpet and […]

True Geordie Net Worth: How Rich the English Podcaster Actually?

True Geordie Net Worth: How Rich the English Podcaster Actually?

Brian Davis, who is better known online as True Geordie, is a British Youtuber. He is best known for his podcast called the True Geordie Podcast along with editor Laurence McKenna where their focus is on interviewing with different Youtubers and Influencers. His channel has a total of 1.7 million subscribers. As of 2019, True […]

Bert Kreischer’s Net Worth: 5+ Things you need to know.

Bert Kreischer’s Net Worth: 5+ Things you need to know.

Bert Kreischer’s Net Worth I could not find a year-by-year breakdown of Bert Kreischer’s net worth from 2015 to 2023. However, I did find different estimates for his net worth in 2023, ranging from $4 million to $14 million​1​​2​​3. In 2022, his net worth was estimated to be $16 million, according to Forbes​4. Other sources […]

Brooks Koepka Net Worth

Brooks Koepka Net Worth

Who is Brooks Koepka? Brooks Koepka is an American golfer who mostly plays on the PGA Tour. He won his first major championship at the U.S. Open in 2017. Early Life Brooks was born on May 3, 1990, in West Palm Beach, Florida to Bob Koepka and Denise Jakows. He went to Cardinal Newman High […]

Trending