WordPress Glossary Plugin (CMTG) - Use Case - How to Work With Large Glossaries


Use Case – How to Work With Large Glossaries

Back to User Guides

Note: This guide covers features from: 

Video Use-Case


Introduction

The WordPress Glossary plugin allows you to create a site with a complete glossary of terms. Each term's definition can appear on mouse hover across the whole site. 

Use Case Front-End

Message about successful import - WordPress Knowledge Base Plugin
Message about successful import

Use Case Assumptions

In this example use case guide we will consider how to import large glossaries to the database on your WordPress site.

We consider that you have already bought the plugin, but not installed it yet. 

It follows:

Installing the Plugin

The process is the same for all CM plugins and add-ons.

CreativeMinds Customer Account Dashboard - Downloads tab
CreativeMinds Customer Account Dashboard
  • Download the plugin from your customer dashboard.
  • Log in to WordPress and navigate to the WordPress Admin → Plugins settings.
  • Click on Add New.
  • Activate it and add the license.

Learn more: Getting Started - Installation And First Steps


Quick Recap

In this use case we will cover only issues connected with importing large glossaries. If you want learn more about how to configure the plugin and create your glossary, please, refer to this use case guide:

What It Is All About

The Pro, Pro+ and eCommerce editions of the WordPress Glossary plugin support the options for importing and exporting glossary terms. 

This gives you the ability to replicate your Glossary Terms database easily and migrate it across several sites and even to import large dictionaries into the plugin. It also can be a good way to make back-ups of your glossaries.

For most WP websites importing around 1000 terms at one time should work well. But importing too large glossary, like more than 1000, may cause a critical error. 

Example of the error while importing huge glossary - Knowledge Base WordPress Plugin
Example of the error while importing huge glossary

Critical errors like this can be caused by the limited server resources:

  • PHP time limit - This is the maximum time that your site spends for committing single operation before it will be interrupted.
  • PHP memory limit - As WordPress is written using PHP (a server-side programming language), it demands memory to run a few applications effectively at the same time.

Important

Have a note that using featured images in CSV-file greatly increases the memory consumption of your server resources. So it can also affect the import process.

Ways To Solve Import Issues

Update 2024

Since the plugin version 4.3.3, the import process was optimized and there was added an option which allows you to have more control on the import process.

Now there's no need to divide a huge glossary CSV file into smaller files to import all terms. Now you can just import one file and define the number of items to process in one go.

Defining the number of items to process in one go - WordPress Glossary Plugin
Defining the number of items to process in one go

All advices below in this guide are still can be useful like increasing the PHP Max Execution Time value. But if you don't have an ability to increase it or experience some difficulties with it, you can just use our new option - reduce the number of items to process in one go. As a result, the import process can take more time, but all terms will be sucessfully imported without interruptions due to critical errors caused by the low value of PHP Max Execution Time.

Separate CSV File

First of all, if you have a glossary with more than 1000 terms, you can separate the CSV file with your terms into a few smaller CSVs. This way you can import all your glossary terms in a few steps and make importing process easier by lowering load on your site resources.

Increase Server Limits

One more thing, you can do is to increase server limits of your site - PHP memory limit and PHP time limit. We recommend to set these values as following:

  • PHP memory limit - at least 512 Mb or 1 Gb.
  • PHP time limit - at least 300 seconds or more.

How to Find Your Server Limits Information?

There are two ways, how you can find the actual information about these limits on your site.

1) First way - check it in our plugin. Navigate to Admin Dashboard → CM Tooltip Glossary → User Guide.

Navigation to the user guide page - Glossary Plugin WordPress
Navigation to the user guide page

You can find needed information under the section System Information.

Checking PHP memory limit and max execution time - Tooltip Plugin WordPress
Checking PHP memory limit and max execution time

2) Another way to find this information - navigate to Admin Dashboard → Tools → Site Health.

Navigation to the Site Health page - Wiki for WordPress
Navigation to the Site Health page

Head to the tab Info.

Info tab - Wiki WordPress Plugin
Info tab

Scroll down and find the section Server. Under this section you can find actual information:

Checking PHP memory limit and max execution time - WordPress as a Wiki
Checking PHP memory limit and max execution time

How to Change Server Limits?

There are 4 methods, how you can increase your server limits.

1) Contact Your Host

The simplest and best way - get contact with your hosting company and ask them to increase the memory and time limits.

2) Edit "wp-config.php" file

The file "wp-config.php" contains basic configuration information about your site. You can find it in the root directory of your WP file system.

Where to find the file wp-config.php - Tooltip WordPress Plugin
Where to find the file wp-config.php

You need to open that file and edit or add the following lines before the words "That's all, stop editing!":

define('WP_MEMORY_LIMIT', '1024M');

set_time_limit(1200);

  • First line will change the memory limit to 1024 Mb. You can set here needed to you value.
  • Second line will change the time limit to 1200 seconds. You can set here needed to you value.
Increasing PHP memory and execusion time limits - Wiki Plugin for WordPress
Increasing PHP memory and execusion time limit

Don't forget to save the changes after editing.

3) Edit "PHP.ini" file

If editing the file "wp-config.php" didn't help, you can try to change the limits by editing the file "PHP.ini". But have a note that not all hosts provide the access to that file. The file might be located in the root directory, but the location can vary depending on your host.

So, you need to locate the file, then edit or add the following lines:

memory_limit = 1024M;

max_execution_time = 1200;

Here you can also change the values to the one that you need.

Then you need to save changes and restart your server.

4) Edit ".htaccess" file

In case if you don't have access to the file "PHP.ini", you can try to edit the file ".htaccess". But, again - not all hosts provide the access to that file. 

Here are the lines that you need to edit or add:

php_value memory_limit 1024M

max_execution 1200

Don't forget to the set values that you need and save changes after editing the file.

After making these changes, you can check the server information to be sure that the changes were applied:

Result of increasing the limits - WordPress Internal Linking Plugin
Result of increasing the limits

Import Process

To import the glossary, navigate to Admin Dashboard → CM Tooltip Glossary → Import/Export.

Navigation to the import and export dashboard - WordPress Glossary Plugin
Navigation to the import and export dashboard

Scroll down to the section Import Glossary Terms from File. Choose the CSV file with your glossary using the button Choose File, then click Import from CSV.

Importing the CSV file - WordPress Knowledge Base Plugin
Importing the CSV file

The import process takes some time. When finished, you should see the message about imported terms:

Sussess message about imported terms - Knowledge Base WordPress Plugin
Sussess message about imported terms

End Result

Now you can import large glossaries. If it still causes a critical error, then try to increase more the limits of memory and time.

Following instructions found in the plugin and guides you should be able to import large glossaries to the database on your WordPress site.

Use Case Front-End

Importing large glossary with more than 1000 terms - Glossary Plugin WordPress
Importing large glossary with more than 1000 terms

More information about the WordPress Glossary Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.