FacetWP’s indexer can stall temporarily, for several reasons. If this happens, the first thing to do is wait a few minutes. FacetWP includes built-in resume functionality. It should resume automatically after a minute or two, if you keep the FacetWP settings screen open.

In specific circumstances, the indexer can get permanently stuck, often around the same percentage. These are the most common causes:

Fix memory exhaustion

The server running out of memory is the most common cause of a stuck indexer. This can be confirmed in the server’s error log. If you don’t have access to your server’s error log, you can confirm it as follows:

  • First enable WP_DEBUG and WP_DEBUG_LOG in your wp-config.php file.
  • Then, start a re-index by clicking the Re-index button, and wait until the indexer is definitively stuck.
  • After that, go to your site’s wp-content/ directory on your server and find the text file called debug.log. Open it in a text editor to view your server’s error log.
  • The log file can be very large. Check for errors near the bottom, around the time the indexer last got stuck, which is probably the last error logged. Most likely you’ll find a so-called “Fatal error” relating to memory, something like: “PHP Fatal error: Allowed memory size of {x} bytes exhausted (tried to allocate {x} bytes)”.

If you find there are memory exhaustion errors, the next step is to give WordPress more memory, while making sure this amount does not exceed the server’s memory limit.

Fix a .htpasswd login blocking resuming

If your site is behind a .htpasswd login, the indexer might be blocked from resuming. In these cases, you’ll need to pass the access credentials to FacetWP.

Fix WP Engine settings

If you are hosting your website on WP Engine and you are experience problems with FacetWP’s indexer stalling or not indexing all your posts, try adding the following line to wp-config.php (not functions.php):

How to use custom PHP code?

PHP code can be added to your (child) theme's functions.php file. Alternatively, you can use the Custom Hooks add-on, or a code snippets plugin. More info

define( 'WPE_GOVERNOR', false );

WP Engine limits long queries (longer than 1024 characters) for performance reasons. The above line in wp-config.php prevents that.

For an overview of all common indexing issues, see this page.

See also

Last updated: November 22, 2024