Categories
General Awereness Internet Virals WordPress

How to Block IP Addresses and Attacks in WordPress

WordPress is the best Blogging and CMS platform, but many people are reporting about a lot of Spam comments and attacks by various IP addresses on WordPress.

So what if you eliminate this problem?
Then WordPress will be obviously the winner among all Blogging/CMS Scripts.

Recently we have came across a pluginĀ WordPress IP Blocker Pro, which can stop almost all spam comments and IP address attacks.

LionScripts’ WordPress IP Blocker Pro allows you to stop the Spam Visitors, Comments and attacks by a number of methods.

The Main features of WordPress IP Blocker Pro are:

  • Bulk IP Addresses Upload via CSV
  • Temporary / Permanent Blocking
  • Country Specific IPs Blocking
  • Automatic IP Blocking on Suspicious Activity
  • Time Specific Block on IPs
  • Exclude any IP, from the Blocking List
  • E-Mail after each Automatic IP Block
  • Block or Allow IPs (With Wildcard Support for upto 4 Octets e.g. 123.12.23.* , 123.12.*.* etc.)
  • Personal Network Viewer / Selective IP Viewing

Screenshots:

WordPress IP Blocker Pro
WordPress IP Blocker Pro
WordPress IP Blocker Pro
WordPress IP Blocker Pro

Download: WordPress IP Blocker Pro has 4 types of licenses (starting from $49) targeting towards all kind of audience. You can download the WordPress IP Blocker Pro at Lion Scripts Website.

Website: http://www.lionscripts.com/ip-address-blocker.

Categories
Online Services WordPress

Solution for – Fatal error: Call to undefined function wp_get_current_user() in /wordpress/wp-includes/capabilities.php on line 1183

Solution for - Fatal error: Call to undefined function wp_get_current_user() in /wordpress/wp-includes/capabilities.php on line 1183
Solution for - Fatal error: Call to undefined function wp_get_current_user() in /wordpress/wp-includes/capabilities.php on line 1183

After the release of WordPress Data Guard Pro Plugin (Version 2.9), few users reported that they are getting the error like :

Fatal error: Call to undefined function wp_get_current_user() in C:\xampp\htdocs\wordpress\wp-includes\capabilities.php on line 1183

Solution:
If you run into the same problem, then there is a simple solution for it.

Just write the below code in wordpress/wp-includes/capabilities.php after ?php sign.

require_once("pluggable.php");

Now you will be able to load all the pages without any error.

So, What is the exact problem :
This problem arises when one of your plugin or theme file wants to get the user type (e.g. Administrator, Editor, Contributer, Author, Subscriber) either in form of a function or in form of variable.

For Example, the below code will generate the same error, if placed in a plugin file:

if(current_user_can('level_10')) {$user_is = 'Admin';}
else {$user_is = 'Not Admin'; }

So in such cases, you can include the pluggable.php file into capabilities.php file.

Note : You might bookmark this page for the future references, as after updating the wordpress, capabilities.php gets restored to default, and then you need to follow the same procedure again.