How to fix the number of comments and categories in WordPress

When moving WordPress from one host to another, information is sometimes lost. Although it doesn’t happen often, you may encounter the wrong number of comments or categories in WordPress.

This can be Thailand WhatsApp Number List misleading and confusing to visitors and affect any data you collect regarding these aspects. For example, a visitor may see that you have 0 articles in a category when it can accommodate more than 400.

In this tutorial, I will show you how to fix category count as well as comment data in WordPress after an import.

Before you start, be aware that this means you will have to do some coding work. However, it is not too difficult.

Also note that this fix does not work with PHP 7 .

Backing up your site

It’s always a good idea to create a backup of WordPress when making any changes. If something goes wrong, you can easily restore the site.

If you don’t know how to do this, I suggest you use the UpdraftPlus plugin. It’s a great tool that lets you save to your own cloud accounts like Dropbox or Google Drive.

While I don’t foresee any real issues from this tutorial, it’s better to be safe than sorry.

Creation of Category-fix.php

Today we are going to create a new file called “ category-fix.php ”. You can do this in several ways:

  • Create a Notepad file on your computer.
  • Use the File Manager tool in cPanel.
  • Use a plugin in WordPress like WP File Manager.
  • Thailand WhatsApp Number List

For this tutorial, I’m going to keep it simple and just use the file manager in cPanel. After adding the code to something like Notepad, you would obviously save the file as “category-fix.php”. Next, you’ll want to use an FTP program like FileZilla or cPanel’s file manager to upload the file.

In most cases, the “HTTP ERROR 500” screen is caused by the fact that you are using PHP 7 while trying this fix. Latest versions of PHP have removed the ability to access the database this way.

You will need to know what version of PHP you are using to eliminate this problem. You can access it from the “Select PHP Version” tool in cPanel.

Leave a comment

Your email address will not be published.