Custom Search

Monday, October 17, 2011

CPU Limit Self Hosted Wordpress on Shared Hosting

I moved from blogger to self hosted wordpress on shared hosting. It was unlimited disk space and bandwidth. It was very good for couple of months.

Suddenly one day I got warning from my hosting "your CPU limit exceeded"if this continues we will stop service. I was surprised to see this. unlimited disk space and bandwidth, still I got this warning why?? then I googled and found the answer. people often see only disk space and bandwidth, but there is one more important element i.e CPU LIMIT.


CPU limit depends upon number of users online at a time.
it means the site can get a lot of viewers but they shouldn't be online at a time. for example daily views of your site is 1000/day, but the number of views/viewers online at a time should not exceed 10 or 20 or other number depending upon hosting service.

so, is it possible to control the number of viewers ONLINE at a time?? NO.

Again I moved back to blogger.

BEFORE MOVING BACK FROM WORDPRESS TO BLOGGER WE HAVE TO DO ONE THING SO THAT WE WON'T LOSS THE TRAFFIC.


that I will post next...
read more "CPU Limit Self Hosted Wordpress on Shared Hosting"

Thursday, March 17, 2011

How to Allow Duplicate Comments in Wordpress.org

How to disable Duplicate Comment filter. when a comment is posted second time wordpress shows a error "Duplicate comment detected; it looks as though you’ve already said that!". How to remove this ??

There is a simple trick to do it. go to "/public_html/wp-includes" through ftp and locate comment.php file. Right click view/edit,

find


// Simple duplicate check
// expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)
// $dupe = "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_approved != 'trash' AND ( comment_author = '$comment_author' ";
// if ( $comment_author_email )
// $dupe .= "OR comment_author_email = '$comment_author_email' ";
// $dupe .= ") AND comment_content = '$comment_content' LIMIT 1";
// if ( $wpdb->get_var($dupe) ) {
// if ( defined('DOING_AJAX') )
// die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
//
// wp_die( __('Duplicate comment detected; it looks as though you’ve already said that!') );
// }

just delete and save it. that's it from now on you can post the same comment again and again.
read more "How to Allow Duplicate Comments in Wordpress.org"