ShareThis Slowing Down Your Site? Here’s Why.

I’ve never been a fan of ShareThis. It’s caused nothing but headaches and slow load times on sites I’ve installed it on. I had always assumed it was because they had slow servers, but until recently, never really dug into it. If you’re having problems with ShareThis slowing down you site, read below. I was pretty surprised to find out what was really going on.

I cringe every time I hear someone mention ShareThis. When optimizing a site, it becomes a nightmare to speed up; a paranoids worst fear with all the third-party calls it makes — and a blackhole for sercuity experts tracking down the seemingly ever-changing external scripts it loads.

ShareThis Third-Party Resources

In the process of implementing a CSP, I was shocked to find the total number of resources ShareThis calls. At the time of writing this, I counted a total of 39 domains and subdomains it the ShareThis plugin was calling:

  1. (JavaScript, Image)
  2. (JavaScript)
  3. (JavaScript)
  4. (CSS)
  5. (Image)
  6. (Image)
  7. (Image)
  8. (JavaScript)
  9. (JavaScript)
  10. (JavaScript)
  11. (JavaScript)
  12. (JavaScript)
  13. (JavaScript)
  14. (Image)
  15. (Image)
  16. (Image)
  17. (Image)
  18. (Image)
  19. (Image)
  20. (Image)
  21. (Image)
  22. (Image)
  23. (Image)
  24. (Image)
  25. (Image)
  26. (Image)
  27. (Image)
  28. (Image)
  29. (Image)
  30. (Image)
  31. (Image)
  32. (Image)
  33. (Image)
  34. (Image)
  35. (Image)
  36. (Image)
  37. (Image)
  38. (Image)
  39. (Image)

Nuts, huh?! Not a big surprise anymore why ShareThis was causing my slow page load times. From what I found, the majority of the calls are for ad and user habit tracking pixels. No wonder their a free service, their probably getting paid big bucks from companies to track what you’re doing. Though, I understand they need to connect to the various social network APIs to grab numbers, I don’t think they need to add tracking pixels for advertisements and user habits.

An example is and Their domains used by Targus Info and Lotame which is an advertising company that is part of a network of sites, cookies, and other technologies used to track you, what you do and what you click on, as you go from site to site, surfing the Web. Over time, sites like and can help make an online profile of you usually including the sites you visit, your searches, purchases, and other behavior. Your profile can then be exchanged and sold between various companies as well as being sold to other advertisers and marketers.

Alternatives to ShareThis

After finding out everything ShareThis is doing, it was time to find some alternatives. Here’s some I’ve found that seem to be less resource intensive—though may still load ad and user habit tracking pixels, not nearly as many as ShareThis:

WordPress Plugins

If you prefer a more plug-and-play options, here’s some pretty good WordPress plugins and Drupal modules for social sharing.

1. Flare

Flare is a simple yet eye-catching social sharing bar that gets you followed and lets your content get shared via posts, pages, and media types.


2. Social Count Plus

Display the counting data of Twitter, Facebook, YouTube, Instagram, Steam Community, SoundCloud posts and comments.

Social Count Plus

3. Dig Dig

Your all in one share buttons plugin. Add a floating bar with share buttons to your blog. Just like Mashable!

Dig Dig

4. AddThis

AddThis Share Buttons help drive traffic to your site by helping visitors share, bookmark and email your content to over 330 services.


5. Shareaholic

Adds an attractive social bookmarking menu and related content widget to your posts, pages, index, or any combination of the three.


Drupal Modules

1. Social media

The social media module helps integrate your website with social media sites such as Twitter, Facebook and Google+. It provides an centralized way of managing social media profile information and plug-in widgets such as follow and share buttons.

Social Media

2. Easy Social

Centered in a single place, you don’t need to worry in including external javascript libraries, and enabling several social modules.

Easy Social

3. AddToAny

This module helpers your readers and subscribers share, email and bookmark your articles and pages using the popular services such as Facebook, Twitter, Pinterest and over 100 more.


4. AddThis

This is the #1 bookmarking and sharing button on the net. Simple and easy to use button that’s used by 14 million websites worldwide and reaching 1.3 billion people worldwide per month.


5. Service links

Service Links facilitates the adding of social networks links or javascript buttons within the content with a special focus on developers and themers interested to extend their number or customize their displaying. Built on Drupal for Drupal doesn’t include commercial advertising or spying hidden code and doesn’t require third part libraries.

Service links

How to Fix WordPress CSS & JS From Breaking

I recently came across a strange WordPress issue that was driving me up a wall. After completing a fresh install in a MAMP environment, I was having intermittent issues where it appeared the CSS and JS wasn’t getting loaded in the admin dashboard.

Ever run into CSS or JS failing to load when working on a WordPress project locally? Me too!!! I even tried a fresh install using MAMP, but still got intermittent issues. It was driving me nuts until I did a little googling and found what the problem was.

WordPress loadscripts Screenshot Error

If you’re seeing something like what’s shown above, you’re probably having the same issue I was with the load-scripts.php and load-styles.php files. I was surprised to see on a fresh install of WordPress, console was returning a bunch of CSS and JS errors. I took a look at one of the problem files, load-scripts.php from the console and found:

WordPress load-scripts.php Console Error

Yikes! Initially I thought my install got corrupted somehow, so tried to re-installing WordPress again with no luck. After digging around, I came across this post by Michael Novotny.

Basically, he found that hacking a WordPress core file — which is a big no-no, could fix the problem. In wp-admin/load-styles.php he replaced this line:



error_reporting( E_ALL | E_STRICT );

and Viola! All was working again. Although like I said, editing a core WordPress file is never a good idea.

The Solution

So what’s a good fix for this bug? One of Michael’s readers, Dan, posted a comment in response to his post:

I also had this issue with MAMP pro. I found that adding:

define( 'CONCATENATE_SCRIPTS', false );

to wp-config.php worked as well. Perhaps you might feel a little better modifying config file over a core file.

This is a much better fix instead of hacking at WordPress’s core files. So in wp-config.php at the bottom of your file, place the following code:

define( 'CONCATENATE_SCRIPTS', false );

Check out this article by Jean Galea for further reading on this pesky bug.

Most Useful WordPress SQL Queries

WordPress is one on the most popular CMS around and for good reason. The ease at which it allows anybody to build and maintain websites can’t compare to other systems like Drupal or Joomla. Sometimes though, you’ll need to transfer a WordPress site to another URL or clean up your database to boost server performance. This can sometimes be tricky if you attempt to handle everything through the admin panel. To make life a little bit easier, I’ve put together a list of the most useful WordPress SQL queries.

WordPress is one on the most popular CMS around and for good reason. The ease at which it allows anybody to build and maintain websites can’t compare to other systems like Drupal or Joomla. Sometimes though, you’ll need to transfer a WordPress site to another URL or clean up your database to boost server performance. This can sometimes be tricky if you attempt to handle everything through the admin panel. To make life a little bit easier, I’ve put together a list of the most useful WordPress SQL queries.

Before you proceed…

It’s always good practice to backup your database before making any major changes. Should something go wrong, you’ll always be able to restore the old site. If you need help, try one of these useful WordPress plugins:

  • WP-DB-Backup
    WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.

  • WP-DBManager
    Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.

Alternatively, you can backup your database through phpMyAdmin manually.

The Most Useful WordPress SQL Queries

Running simple SQL queries like the ones listed below is easy. One of the easiest ways to accomplish it is through phpMyAdmin. If you don’t have phpMyAdmin installed or unsure how to access it, like with most things WordPress, there’s a plugin that can help you out. The WordPress SQL Executioner is a plugin that allows you to execute SQL queries through the admin panel.

Update the site URL & home URL

When you install WordPress for the first time, it stores the absolute path of the site URL and home URL in the database. This can make it a little tricky when you transfer your WordPress site from one URL to another. When you try, your site won’t load because the absolute URL is still set to the old URL. Fixing this is easy by updating the site URL and home URL in the database:

Update the GUID

One of the most crucial updates to make after a site transfer is the GUIDs. This is important because the GUID is used to translate post and page slugs to the correct absolute path. Updating this is just as easy as updating the site URL and home URL:

Update the URLs in your content

Like the site URL and home URL, WordPress uses absolute paths when embedding media and links into your posts or page content. When you transfer a WordPress site to a new URL, you’ll need to make sure to update those URLs so they don’t get broke. This can be a tedious and time-consuming process if you have a lot of content to update. Running the SQL query below will make it fast and easy:

Update image paths only

If you use a CDN or cloud service like Amazon CloudFront to serve images, you’ll need to update the image paths in your existing posts and pages so they get loaded by the service instead of your server. Use the query below to only update image paths:

Update your posts meta information

WordPress stores special post information in a separate table. If you’ve transferred your WordPress site, you’ll need to update that information should any of it point to your old URL. Use the query below to easily do this:

Change the default “admin” username

When you first install WordPress, it’s default account username is set to “admin”. Since this is widespread knowledge, it causes security concerns and should be changed. Changing it to a more unique name can boost your site’s security. Use the query below to change the default “admin” username:

Change your WordPress password

Need to change your WordPress password and can’t find where to do it in the admin panel? Use the query below to quickly make the change:

Assign posts from one author to another

Say you want to transfer articles from one author to another. This is another time consuming and tedious process if you’ve got a lot of posts on your site. You can easily and quickly make this change, but first need to obtain the author’s ID by going to your user page in the WordPress admin panel. Click the user’s name to view their profile and then look at the address bar taking note of the “user_id”. Then, use the query below to easily transfer ownership from articles assigned to one author to another:

Delete revisions

When you edit WordPress posts of pages, by default, it saves each revision so you can easily revert should something go wrong. This can cause use up your server resources when you have thousands of entries. Your database will grow significantly and will cause an increase in loop iterations, data retrieval and will affect page load times. To help optimize your WordPress database, delete old revisions that you don’t need anymore by using the query below:

Note: Bear in mind that all revisions from each post will be deleted, including all of its meta data.

Delete post meta

Installing or removing plugins is a very common task for WordPress. Some of the plugins make use of the post meta to store data pertaining to the plugin. After you have removed the plugin, those data are still left inside the post_meta table, which will no longer be needed. Run the following query to clean up the unused post meta value. This will help to speed up and reduce the size of your database.

Export all comment emails with no duplicates

Over a period of time, your blog will have received many comments. These comments will include the email addresses left by the commenter. You can retrieve all these emails for your mailing list without any duplicate.

Delete all pingbacks

Popular articles receive plenty of pingback. When this happens, the size of your database increases. In order to reduce size of the database, you can try removing all the pingbacks.

Delete all spam comments

If you have plenty of spam comments, going through each page to delete spam can be tedious and frustrating. With the following SQL query, even if you have to face deleting 500 over spam comments, it will be a breeze.

  • 0 = Comment Awaiting Moderation
  • 1 = Approved Comment
  • spam = Comment marked as Spam

Delete unused tags

In a WordPress database, if you run a query to delete old posts manually from MySQL, the old tags will remain and appear in your tag cloud/listing. This query allows you to delete the unused tags.

Find how many entries are spam

We look at the column comment_approved. Here WordPress stores the type of the comment. We collect the amount of the different values with COUNT(*) and put it into the variable amount.

comment_approved amount
spam 12118
1 104
post-trashed 1

The 1 represents approved, real comments. We are already seeing: only 0.85% of all comments are spam. Unfortunately, this is a normal value. The mean part is: MySQL must always go through the entire table to find the real comments for the output in the published articles. With an index, an optimized query structure, this goes faster.

Find which posts suffer from the most spam

The more popular a post is, the more spam it attracts. Some posts get almost never spam, others are downright overwhelmed. We get the 20 most spammed posts with this query:

comment_post_ID amount
1776 2299
2184 1840
143 1759
1366 1145
2377 960
2456 512
2536 497
683 486
1373 236
1402 200
1522 174
2458 161
1168 127
10473 121
647 116
2357 114
2831 111
2420 110
741 94

Now we could protect for these articles the comments with a registration or just close the comment form. Both solutions are not ideal.

Find where the most spam comes from

comment_author_IP amount 450 386 287 268 218 181 157 153 148 147 140 117 109 91 88 82 80 80 73 63 63 55 54 54 51 48 48 46 46 46

There is so much spam from some IP addresses that we can lock them out safely. This is works in a .htaccess, for example, like this:

# IP block list
order allow,deny
deny from
allow from all

Do you have any useful WordPress SQL queries you use?

I’d love to hear from you! Comment below with some useful WordPress SQL queries you use to update, optimize and manage your site.

WordPress or Drupal: Compare to learn what’s best for your site!

I recently received a message from a local Austin computer technician, Sergio Garcia. His question is a common one among business owners looking for a quick and easy solution to setup and mange their new sites, which is better, WordPress or Drupal.

Hey I just have a quick question, I fix computers in the South Austin area for a living and it has been time for me to have a website. Nothing too complicated but a good-looking simple and effective page where guests can find my business phone number, map where they can find me, maybe with a slider in the first page with pictures of my work and the office, blog and all that.
I don’t know much but I hear Drupal and WordPress are good options but I do not know which one is better.

Do a quick Google search for WordPress or Drupal and you’ll find article after article proclaiming one over another. It’s a never-ending debate that’s been taking place for decades. Years ago, there may have been a right and wrong answer to that question, but with time comes technology and technology is what builds advanced CMS. Since the release of WordPress 3.0 on June 17, 2010 and Drupal 7 on January 5, 2011, the line between which is better has become fuzzy. It’s no longer a question which is best, but which is best for each person site’s needs. I might take some flak for this statement, but I challenge my readers to prove me wrong; There’s nothing a WordPress site can do that a Drupal site can’t and nothing a Drupal site can do that a WordPress site can’t.

Continue reading “WordPress or Drupal: Compare to learn what’s best for your site!”