Fatal error cannot redeclare class TextStatistics Easy WP Seo

Problem: You try to save a draft, publish or update a post in WordPress and you get:

Fatal error: Cannot redeclare class TextStatistics in /home/nasalcon/public_html/wp-content/plugins/easywpseo/onpageseo-readability.php on line 35

This is caused by a conflict between Yoast’s excellent WP SEO plugin and the (equally excellent) Easy WP SEO plugin. It was triggered on the v1.2 update of the Yoast plugin that happened on 12th June 2012. Now I’ll make it clear that the problem does not appear to be with Yoast’s plugin, it seems to be the fact that both are using the php Text Statistics code released here:

https://code.google.com/p/php-text-statistics/

I have contacted the developer of EasyWP SEO but, to date, have had no reply. Since it renders a website unable to create posts, I thought I’d better write a fix for my clients and for those of you who use both plugins. I have added a small text link to this article in case the developer updates the plugin, I’ll let you know here if he does.

Many people use Yoast’s plugin for its useful sitemap and meta description functionality and have no need for the SEO scoring tools that were introduced in the last update as they use alternative plugins.

The TextStatistics fix

What I have done is modified the code to temporarily disable the calls to the readability class within Easy WP SEO.  Most, if not all of my clients do not use the Flesch-Kincaid Reading Ease tests in the ‘Readability’ section so this has no adverse effect.

To apply my fix, you’ll need to update just 2 files on your server. I presume that you are familiar with FTP and unzipping, let me know if not. I’ll also presume you are running the latest version of Easy WP SEO (v1.6 or 1.6.2), I am unable to check any backwards compatibility. My method does create backups of both files though so should be very safe.

Download the zip file here (UPDATE – THIS IS NO LONGER NECESSARY, THE AUTHOR HAS NOW FIXED THE PROGRAM) and follow this method:

  • Extract the files onto your desktop, they’ll be in a folder called PCRMB-EWPSEO-fix-v1.
  • Using an FTP client, navigate to wp-content/plugins/easywpseo/ and rename the file “onpageseo-admin.php” to “onpageseo-adminBAK.php
  • Copy the extracted file “onpageseo-admin.php” from your new desktop folder to wp-content/plugins/easywpseo/
  • Now navigate to wp-content/plugins/easywpseo/templates/ and rename the file “admin-score-metabox.php” to “admin-score-metaboxBAK.php
  • Copy the extracted file “admin-score-metabox.php” to wp-content/plugins/easywpseo/templates/

Create a test post and fill in some keywords in the Easy WP SEO box. You should now have no conflict between Yoast’s WP SEO and Easy WP SEO.

Please note that you should not fill in the WP SEO ‘Focus Keyword’ as you are choosing to keep the more graphical Easy WP SEO tool as the primary SEO scoring indicator.

Please drop me a comment below or click one of the social buttons if this helped you. Also please let me know if you get any other errors.

 


AVG keeps asking to upgrade

You have a problem where AVG antivirus is prompting you to upgrade all the time.

What has probably happened here is that you have installed the wrong version.  You wanted free and you installed the trial version.

AVG does try to ‘direct’ you towards the full product as a trial version.  The free version is generally cleverly made less accessible on their website.  Remember though, this is a free product and offers the same scanning and detection capabilities as the full version so they are doing you a favour by giving it away.  You can’t blame them for wanting to make some money!

Click here to see the differences between free and paid for versions of AVG antivirus


Printer keeps printing pages when pc starts

If your printer keeps printing pages when your pc starts, then follow these steps to clear the print queue.

These instructions are for Windows 7 or Vista, and won’t do any harm to your PC. I usually advise this and 99.9% of clients will cure their printer problems this way.

 

  1. Click Start.
  2. In the box above, type cmd
  3. Right-click on cmd.exe (the command prompt shortcut) and select Run as administrator
  4. In the black box that appears, type net stop spooler then press Enter
  5. Type in del %systemroot%\System32\spool\printers\*   /Q then press Enter. (Note there is a space before the /Q)
  6. Type net start spooler then press Enter

 

The print queue on your Windows 7 or Vista PC will now be cleared out. Close the black command window using the cross at the top and restart your PC.

 

Has my fix for Printer keeps printing pages when pc starts worked? Then please use the icons below to tweet, like or share this article if you found it useful, it really helps this site to help others!


Manage multiple WordPress sites with WPRemote

Looking for an easy way to manage updates on multiple WordPress websites? Well there’s a new tool in town and it’s called WP Remote. Here’s a brief review.

This nifty tool installs on WP sites via a small plugin and gives you a single console from which to monitor your sites for plugin updates, theme updates and WordPress updates. You can apply the updates from the console so no need to login to any site after the initial plugin install. Not only that but it allows manual backups of files and MySQL databases in one click. Fiddly and incomplete WordPress backups are a thing of the past, you can expect to add the site to the console, update all plugins and themes and do a complete backup within a few minutes. Stunning.

It’s free, easy to setup, minimalist, stable and incredibly useful. And no, I don’t own the company, just thought you might like it as much as I do. Look out for this company over the next few months as I think this is going to be very popular!

https://wpremote.com


Format external drive FAT32 using Windows 7, XP or Vista

Sounds simple right, format an external hard drive using FAT32? Well yes if the drive is a smaller Pen Drive, but as we get towards the larger drives of 32GB or more, then Windows 7, Vista and XP all refuse to touch it unless it’s formatted NTFS.  There are plenty of good reasons why we’d want FAT32 and one of them is probably why you’re reading this.  Projects suitable for this method include sharing a large drive with a Mac, creating a compatible drive for some TVs to read and record to and making a multi-boot external diagnostics disk.

Here’s a screenshot of the standard format tool in Windows 7:

Format large drive FAT32

 

The only other choice offered is exFAT which is not the same. I have noticed that other websites will offer different complex solutions and link to deprecated or paid tools, but by far and away the easiest and simplest way is to use a graphical tool called FAT32 format. You can download it here. It’s free , small and simple.

Running the tool gives this box:

Format external hard drive FAT32

 

Here you can see I’m running it on a 40GB external drive. Make sure you select the correct drive to format! If in doubt, go to My Computer or Windows Explorer to verify you have selected the correct one.

If you are formatting the drive, it’s always best to deselect (uncheck) “Quick format”. It will take longer but the result will be better. Just bear in mind that FAT32 does not support individual files above 4GB but this should not be a problem for most people unless trying to copy larger BluRay DVD images etc.

Hope this works for you and your project, please let me know below!


Disable Google personalized search

It’s difficult to get an accurate set of search results these days from Google as they unfortunately personalize far too much, even if you explicitly tell them not to. Now they have integrated Google Plus into the search results, it’s even more difficult.

Google remove personalization

“Aha” I hear you shout, “I can turn that personalization off by clicking on the settings gear at the top right of the Google page, then clicking ‘Search Settings’ can’t I?”. Well, no you can’t, this just makes “Hide personal results” the default. Worryingly, this choice is not saved with your Google profile and it’s forgotten on browser restart.

So how does someone easily make a fresh, unbiased Google search these days? Well, I would recommend you install Yoast’s excellent free plugin for Firefox and Internet Explorer here:

https://yoast.com/tools/seo/disable-personalized-search-plugin/

For me, I build websites primarily for US and UK, so I selected “Install for Google.com” and “Install for Google.co.uk”.  Set it as your default and use it for your searches as normal.  It removes personal messages like ‘You visited this site 4 times’ which demonstrate that Google tracks you and weights your search preferences accordingly.

For tracking the actual ranking of websites rather than biased ones, it is an invaluable free tool.


Backup website databases with a free automated tool

Backup SQL for freeBackup your web site! If you are using a database driven website such as WordPress, Joomla, Drupal etc you probably know how to FTP files but when it comes to the database many people are baffled.  FTP does not grab the database files (unless Access format) and this is where your backup regime may fail.

Don’t presume that your hosting company will do it all for you. Hard disk drives are mechanical, breakdowns are unavoidable.  And even those who use Raid arrays can end up losing your data.  So who is responsible?  Does it really matter?  That hard work you put in creating the database could take weeks, months or years to recreate.

The answer?  HeidiSQL is a completely free tool which you can download from https://www.heidisql.com

Using this tool, you can backup MySQL databases with ease.  It can also export your MySQL database as a text file onto your PC which is very useful.  You can import or restore any databases provided you have the necessary passwords.

Don’t delay, do it now before you forget!


Different types of graphics card slots

Here I’ll try to explain briefly the graphics card slots used on most PCs.

Video or graphics cards come with three different connector types – PCI, PCI Express and AGP. The slots in your PC’s main board (motherboard) will dictate which one you need.

  • PCI are often white slots and have been around since the early 90s
  • PCI Express also known as PCIe  are often black slots but manufacturers can choose the colour. Useful eh?
  • AGP slots are mostly brown and they have different speeds. The newer versions for sale are predominantly designed for AGP 2.0 and 3.0 standards but check first
  • ISA cards are very old and it’s unlikely you have one of these as they were predominantly an 80s technology

You’ll also need to think what you will be using the graphics card for. Heavy graphics use (eg gaming, 3d rendering etc) will mean you need a more expensive card whereas a cheaper one will suffice for the odd Internet surfing and Word document. Gamers tend to look at FPS (Frames Per Second) as a benchmark to performance but there are a number of factors that contribute.

Hope this helps explain the graphics card slots minefield a bit more! Take a look at my deals on ATI graphics cards and Nvidia graphics cards.

 


Change Windows startup sound to a voice

Change windows startup soundYou know in all those futuristic films where computers speak to their owners? Ever wondered if you can actually get yours to welcome you in this way? Well let’s have a go at doing this and see what we can use it for.

This should work on Windows from XP upwards. If you have security settings a bit high then running scripts may be an issue but it won’t hurt to try this.

Click on Start > All Programs > Accessories > Notepad

In the notepad window, paste the exact code below:

Dim speaks, speech
speaks="Welcome PC Repair Man, what can I do for you today"
Set speech=CreateObject(“sapi.spvoice”)
speech.Speak speaks

Obviously once you have this working, you’ll replace the text with your own!

Save as startmessage.vbs. You can rename this file to anything you like but keep the .vbs on the end. If you can’t see the .vbs then you really should turn on file extensions, it helps you to identify files. Turn on your speakers then double click this file to see if it works.

Copy the saved file and paste it into the following folders (I’m presuming that C is your Windows drive, most are):

  • For XP users: C:\Documents and Settings\All Users\Start Menu\Programs\Startup (in Windows XP)
  • For Windows 7 and Windows Vista: C:\Users\ User-Name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

When you next start your computer, it will welcome you!

NOTE: I’d suggest you don’t turn off the Windows startup sound, it’s best to keep the rest of the system as-is.

To remove, simply delete or move the startmessage.vbs out of your startup folder.

Want to trick a friend? Create a personal message and drop it into their startup folder. Watch as their computer reminds them of something they’d rather not be reminded of like “Hey John, bad luck on the driving test” or “Is that a pimple on your nose, Lucy”.

Don’t be evil, or if you do, don’t tell them it was me that told you how to do it….

 


Disable Livefyre trackbacks in WordPress

livefyre review

I was quite a big fan of Livefyre for a while. Yes there have been many comments about how Comment Luv or Disqus are better and it seems everyone has their own preference. A while back I noticed that Livefyre had a quirk that meant that even if you turned off trackbacks via WordPress admin, this was only activated for new posts and not existing ones. For reference, in WordPress this is turned off in the Settings > Discussion menu.

This isn’t a fault in Livefyre, more a problem with the lack of easy control of posts that have already been published or are in draft within the WordPress database.

So if your older posts have trackbacks enabled you could see something like this (a screenshot from one of my posts here):

 Livefyre trackback removal

Hmm, not doing the article a great deal of favours is it really? From a search engine point of view this article now has duplicate content and more outgoing links.  So what can we do to get the older posts to not display trackbacks? Well we could go back in and edit all the posts that we are aware of by unticking the ‘Allow trackbacks’ box. Unfortunately, on larger blogs this is not practical. Time to get our hands dirty with some SQL statements.

Disable Livefyre trackbacks in WordPress using phpMyAdmin and SQL

Login to your control panel and fire up phpMyAdmin. Select your WordPress database and back it up. If you’re not sure how to do this, I wrote a detailed article here:

Backup WordPress MySQL database using phpMyAdmin (opens in a new window).

So now we have a working backup, select your database and click on the SQL tab from the top menu bar. Insert this code into the command box and click on ‘Go’:

UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post';
UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'page';
UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'draft' AND post_type = 'post';

Note that you need to replace wp_ with your own table prefix if it’s different. You should now have all your old posts that have been published (and any draft posts waiting to be published) disabled for trackbacks.