Fixing Fatal Error In Popularity Contest Plugin

Are you having trouble getting Alex King’s Popularity Contest plugin to activate? You are not alone, almost everyone who has tried to use it with a version of WordPress over 2.5 has had a problem.

But there is now a solution.

1. open up popularity-contest.php.

2. Go to line 59.

3. Replace require(’../../wp-blog-header.php’); with require(’../wp-blog-header.php’);.

If you have your WordPress in a subfolder then simply add the subfolder name after the ../ part.

You’ll now need to create two MYSQL tables so log in and create the following two tables:

CREATE TABLE IF NOT EXISTS `wp_ak_popularity` (
`post_id` int(11) NOT NULL,
`total` int(11) NOT NULL,
`feed_views` int(11) NOT NULL,
`home_views` int(11) NOT NULL,
`archive_views` int(11) NOT NULL,
`category_views` int(11) NOT NULL,
`single_views` int(11) NOT NULL,
`comments` int(11) NOT NULL,
`pingbacks` int(11) NOT NULL,
`trackbacks` int(11) NOT NULL,
`last_modified` datetime,
KEY `post_id` (`post_id`)

CREATE TABLE IF NOT EXISTS `wp_ak_popularity_options` (
`option_name` varchar(50) NOT NULL,
`option_value` varchar(50) NOT NULL

I’m assuming you use wp_ as your table prefix, if you don’t then change that otherwise it won’t work.

Then go and activate your plugin and if you followed these steps correctly then it should now work. 🙂

Image by Pete Linforth from Pixabay

Oh hi there 👋 It’s nice to meet you.

Sign up to get access to all the sites that I have used to make money online.

We don’t spam! Read our privacy policy for more info.

About Dean Saliba

Dean Saliba is a freelance writer, professional blogger, media enthusiast, keen long-distance runner, and huge professional wrestling fan, who covers a wide range of subjects and niches including: making money online, traffic generating, pro wrestling, blog reviews, football, how-to guides, music, internet marketing, running, and more.

Check Also

The 12 Plugins of Christmas

Plugins are a wonderful concept (especially when it comes to WordPress), no matter what software …