Addthis plugin for wordpress – serving request to b.scorecardresearch.com

Recently my website was slow and I tried to search for possible causes.

While checking network traffic in google chrome, I found that my website was making request to “b.scorecardresearch.com” and reputation is not good at all for this site. I did my research on wordpress forums and found that “addthis” plugin was making requests to this site and there is no way to restrict it.

I am writing this post, so that readers would know that one of WordPress plugins that makes request to “b.scorecardresearch.com” is addthis. I have decided to remove this plugin from my blog as I don’t want my visitors information to be traced and slow website.

How to make WordPress blog faster and minimize CPU Usage

In this article, I will share my personal experience regarding this blog performance and nightmares of disabling website everyday because of CPU Utilization. I tried all my best however I was unable to figure out the cause of high CPU Usage by wordPress. I tried many articles on Google and at last I found some pointers and able to escape from this problem.

This article is specific to my problem only, However I am sure it will help many others also.

I started with ways, which will less impact my blog and will take less time.

1. Disable WordPress Cron Job

This was my first step, disabling cron Job. In most of cases we are not using this feature. Mostly it is used when you schedule some article to publish on some day or time. To disable it, Open “wp-config.php” file and add below line at top of page.

define(“˜DISABLE_WP_CRON’, true);

What if I need this cron job ?

You can easily create a cron Job anytime, by following below process.
a. Log into your cPanel.
b. In the Advanced section, click Cron jobs.
c. Under Add New Cron Job, select the time interval. It is recommended not to add time interval less than 15 minutes.
d. Set the cron command to the following, replacing yourwebsite.com with your actual domain name:

wget -q -O – http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

The above command tells the Linux server to run wp-cron via wget, which will trigger the wp-cron.php script to do it’s job on your schedule instead of on each page view. This will lessen the amount of processes on the server.

e. Click Add New Cron Job to set the cron.

2. Disable Plugins

Now, Here comes actual reason for WordPress blog high CPU usage. I had many plugins and started to disable one by one. Continue reading “How to make WordPress blog faster and minimize CPU Usage”

Create Forum inside WordPress blog using Mingle Forum Plugin

Tutorial of How to create Forum inside Wordpress blog using Mingle Forum Plugin

This was the requirement of one of my friend who needed integration of forum with wordpress blog. All the users of wordpress should be able to login into the forum. It was the good idea but normally i have not seen this type of functionality. Then after searching i came across one powerful forum plugin for the wordpress named “Mingle Forum for the wordpress“.

To start with it install the “Mingle Forum” plugin and activate it. Continue reading “Create Forum inside WordPress blog using Mingle Forum Plugin”

Google Speed Online API widget integration with W3 Total Cache in WordPress

Tutorial of Google Speed API widget integration with W3 Total Cache in WordPress with step by step Screenshot

W3 Total Cache is the industry known solution for the caching mechanism of WordPress blog. Even lots of hosting proving companies like HostGator is suggesting the users to use this plugin for there wordpress blog. The “W3 Total Cache ” has lots of advance feature and needs expert level of understanding to enable or disable those options. From many options available, there is the option of displaying “Google Speed Online API” widget on the dashboard of the WordPress which will display the performance of the website on scale of 100.

Getting started with Google Speed Online API:

Go to Google APIs Console and navigate to “Services”.

Google API Console
Google API Console

Continue reading “Google Speed Online API widget integration with W3 Total Cache in WordPress”

Sort comment in reverse order – WordPress

Author posted by Jitendra on Posted on under category Categories Tech Tips, Web Technology and tagged as Tags with Leave a comment on Sort comment in reverse order – WordPress

PHP code to sort the comment in WordPress blog in reverse order

In many cases the blogger may want to sort the comment of there WordPress blog by latest comment at top, like me.

Instead of installing any plugin, i have done following code changes in “comments.php“. Continue reading “Sort comment in reverse order – WordPress”

WordPress error resolved – problem while switching from HTML to Visual editor after embedding the code

Wordpress error resolved – problem while switching from HTML to Visual editor after embedding the code

Hi Friends,
Hi faced this error many times but was unable to analyzed the root cause of problem.
Whenever i embedded the code in my blog and come back to edit, sometime the wordpress editor discarded my code. It was not always but often.

How to reproduce the error ?

  1. Go to HTML tab and embed few html code. i am using syntaxhighlighter, so my code is normally like enclosed in square bracket with text “sourcecode”. Go to Visual Tab it works fine.
  2. Again go to HTML tab , save your article and close the window. (Remember you are closing the window when you are on HTML tab).
  3. Now come to your post and navigate to “Visual” tab. you will notice that your HTML code is discarded. Don’t save anything.
  4. Close the window again. (Remember, this time you are closing the window while you was on “Visual” tab.)
  5. Come back again to your post and you will see that your code is just fine.

Conclusion :
If you close your window while you are in “HTML” tab, next time when you will come back it opens the code in same tab (“HTML”) by default and when you switch to “Visual” tab it discards the html code. So to avoid this problem, always close your window when you will be in “Visual” tab.

Free up MySQL Space in WordPress – Delete Akismet Logs

Author posted by Jitendra on Posted on under category Categories Web Technology and tagged as Tags , with 1 Comment on Free up MySQL Space in WordPress – Delete Akismet Logs

Free up MySQL Space in Wordpress – Delete unused Akismet Logs

Akismet is owsome plugin to protect your WordPress site from the spams. However, before writing this article, i was checking the space used by the database. I was so surprised when i saw that the table named “wp_commentmeta” was having more than 11k records using 20MB of the space.

After some time, i found that Akismet uses that table as a log to display the reports about spam. Spams are automatically deleted by akismet, but entry for every spam was maintained in that table.

When i run below query to find the orphan comments meta :

Select * FROM wp_commentmeta WHERE comment_id NOT IN
(SELECT comment_id FROM wp_comments)

There were nearly 10k records which were orphans. To free up the memory, i run below query

DELETE FROM wp_commentmeta WHERE comment_id NOT IN
(SELECT comment_id FROM wp_comments)

With the help of above query, i free up nearlly 18MB of space.

Please leave your valuable feedback over the same problem.

CPanel – PHP – 500 internal server error

Author posted by Jitendra on Posted on under category Categories Web Technology and tagged as Tags , , with Leave a comment on CPanel – PHP – 500 internal server error

Error Resolved – CPanel – PHP – 500 internal server error

Hello Reader,
Before one day everything on my blog was working great however suddenly i got error “500 internal server error” for my wordpress blog.
After 1-2 hour digging i got to know that my hosting provider has enabled “SU-PHP“.

If The server is having SU-PHP enabled :
You can create a custom php.ini file to customize your php configurations. If you are getting 500 internal server error, please create a file php.ini in your public_html folder and enter the following line:

“suhosin.Simulation On”

If you are getting same error under wp-admin login page then copy your php.ini file under wp-admin/ directory and check once again.

wordpress update error – allowed memory size exhausted

wordpress update error – allowed memory size exhausted

This error normally occurs while updating the WordPress blog, The reason of this error usually because of allocated PHP memory size  for the WordPress blog.

Increasing memory allocated to PHP

Also released with Version 2.5, the WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as “Allowed memory size of xxxxxx bytes exhausted“. Continue reading “wordpress update error – allowed memory size exhausted”

Change Site URL – WordPress – Error – Breaks Site Structure

Author posted by Jitendra on Posted on under category Categories Web Technology and tagged as Tags with 1 Comment on Change Site URL – WordPress – Error – Breaks Site Structure

Changing site URL in Wordpress sometimes breaks the structure of site and users are not able to even login as admin to correct the problem. So here is the solution.

Changing site URL in WordPress sometimes breaks the structure of site and users are not able to even login as admin to correct the problem. So here is the solution.

Below is the example, that how the URL setting breaks the site:

WordPress Change URL Setting Breaks Website - error
WordPress Change URL Setting Breaks Website - error

To fix this problem,

You have to change the entry in database, as you cannot even log in to admin panel of wordpress.

Continue reading “Change Site URL – WordPress – Error – Breaks Site Structure”