Related post plugin of WordPress : How to install it by running a SQL query


Related post plugin has been one of the most useful and highly recommended plugin which helps increase the visibility of your posts by showing a list of posts related to the current post. It’s a very helpful way to showcase your earlier work in a blogging environment where the older posts get buried deeply easily.

However, many people face difficulty in installing this plugin. The normal method of installing a plugin in WordPress (WP) is to upload the plugin in the Plugin directory and then activate it through Dashboard. However, apart from this procedure, the ‘Related Post’ plugin also require you to first run a script so that it can index all the posts in your blog. And here lies the problem.

Many people have faced this problem that when they click on run the script (in the Related post option), they got an error message that says:

“Sorry, you must be at least a level 8 users.”

Actually this message is an indication that you need to manually run a SQL query in your WordPress database. The ‘Read Me’ file of this plugin also says :

“If automatic creation of a full text index fails. You will have to set it up manually. Don’t worry it’s not hard. Just open your database in phpMySQLadmin and run the following command (cut & paste):

ALTER TABLE `wp_posts` ADD FULLTEXT `post_related` (
`post_name` ,

The problem is that most users (included me  ) who are not familiar with SQL or programming etc find it difficult to do this on their own. So here is my tutorial to guide you step-by-step how to run this command.

What we will do ?

Every WordPress blog is powered by a database, which runs in the background. We need to make some modification in that database manually to properly install the plugin. We shall do it by identify the database on which our WP blog is running and then modifying a Table (‘wp_posts’) in that database.

I am assuming you that you are using Cpanel to manage your website and have installed WP using fantastico script (i.e. point and click installation). I have used the acronym WP for WordPress on many places in this tutorial. Please click on the screenshot for full view.

First Step : Identify the Database

If you are only running a WordPress blog and there is no other program/script (which uses database) is installed on your site then it’ll be easy. However, if some other programs (such as link-exchange script, forums etc which also run on databses) are installed on your website, then you’ll have to find the database used by your WP blog. For this login to site/blog using your ftp client and go the the root folder of your blog (i.e. the folder where your WP blog is installed). Here you’ll find a file named ‘wp-config.php’.


Download this file to your hard disk and open it in Notepad. There will be some configuration settings in this file. On the third line you will find the name of the database of your WP blog. Look at the screenshot. In the screen shot the name of the database is : medita00_wrp4.


You’ll need to modify this database of your WP blog. Note the name of this database carefully.

Now we’ll start the modification process. Login into the control panel of your Website. If it’s an old version of Cpanel it’ll look like this :

Here you need to click on the icon which says MySQL Databases.

In the new version of Cpanel all icons are separated category-wise and the Mysql database icon will look like this :


If you have the new Cpanel (as shown in the above screenshot) then instead of clicking on ‘MySQL Databases icon, you can directly click on ‘phpMyAdmin’ icon.

In the old version of Cpanel, we can’t access phpMyadmin directly. Here on clicking the ‘MySQL Databases’ icon, you’ll get following screen :


At the end of this screen, you’ll get a link for accessing the PhpMyadmin like this :


Click on this link.

So, the above are two methods to access PhpMyadmin section of your databases.

Let’s start running the Query

On clicking on phpMyadmin (in either of the new/old Cpanel) you’ll reach at the phpMyAdmin screen. On this screen in the leftmost sidebar, you will see a list of all the databases installed in your website. If your site has only one database then only one database will be listed. In the above example the name of the database was medita00_wrp4. As you can see in the screenshot, the medita00 is the name of the extension which is prefixed at the name of every database (like medita00_wrp4) and therefore is shown in the top of the list. The database which we are looking for is listed at the end of the list. Click on that database. See the screenshot


On clicking the database (‘wrdp4’ in this case), the following screen will appear.


This is the place where we need to run a query. Please note that in the list of tables a table named wp_posts exists. In 99.99% of cases it’ll be there. I am yet to see a WP installation where this table is not present. We are actually altering this table to include an entry for relatedpost plugin.

Click on the button which says SQL . The SQL tab will open like this :


Here copy and paste the code for ‘Related post’ as given in the Readme file of the plugin.

Click on Go. phpmyadminfp11.jpg

The query will be executed and you will get the following message.


Congratulation ! you have installed the Related posts plugin successfully. Now you can use this plugin by inserting the code ( <?php related_posts(); ?> ) somewhere in your WP loop) at any place of your template pages (like single.php). It’ll work.

Please note that despite running this query, you’ll still get the error (of level 8 user) when you click on ‘Run the script’ in the Related post option page. Just ignore it. The plugin will run smoothly despite that error message. Actually this error message says that you can’t create the index automatically and you need to run the query manually (which you have already done). So ignore that message.

One more thing which I have observed is that this error (of level 8 users) is coming in those cases where the newer version of this plugin (2.02-404) is being used. This error does not come if you use an old version of this plugin (2.02). Using this older version, there will be no error and the script will run smoothly when you run it.


It means you’ll not required to run the SQL query. You may try the older version if you want. The developer of this plugin has either closed his website or has shifted somewhere else. So here is the old version of this plugin for you to download.

Related post plugin the older version.

I hope you liked the tutorial. Your feedback on it is welcome 🙂


  1. Thank you so much for this tutorial. I had been trying to install this plugin for like three months (well, I did other stuffs in between :lol:) and I finally got it.

    Many thanks! Very clear and helpful tutorial, best I could find.

  2. Thank you so much. I have searched the web for help and finally, I managed to add with your tutorial. Funny though that all my related posts become ‘random posts’ because WP cannot find any related posts.


Please enter your comment!
Please enter your name here