Generate via Server

Overview

Whilst every best effort is made for the Generate via Server WordPress Cron task to run for as long as possible, it is subject to your web host’s configuration and limits on the maximum execution time of scripts and available memory.  It therefore may be forced to stop before all pages are generated. As such, the support provided for this functionality is limited to this documentation, and we continue to emphasise the use of WP-CLI where possible for server side generation.

The Generate via Server action asynchronously generates content by using WordPress’ CRON system.   This means that you do not need to keep your browser screen open, as the generation processes is triggered and monitored on the server side by WordPress’ CRON system.

This does not schedule a task to generate content hourly, daily, weekly etc.  It performs as if you clicked the Generate via Browser button, and will generate content once.  Its sole purpose is to offload generation from the browser to the server as a one time process, and means you don’t need to keep your web browser window / tab open or maintain an active internet connection.

Running

To access this option, visit:

  • Content: Page Generator Pro > Generate: Content > click Generate via Server in the table for the applicable Content Group:
    Page Generator Pro: Generate: Status
  • Terms: Page Generator Pro > Generate: Terms > click Generate via Server in the table for the applicable Content Group:
    Page Generator Pro: Generate: Status

A message is displayed on screen confirming you want to generate Pages / Terms:
Page Generator Pro: Generate: Run: Confirm CRON

This process does not begin immediately; it can take a few minutes before starting.

The Content Group’s Status will update to Scheduled
Page Generator Pro: Generate: Server: Scheduled

After a few moments, you may wish to refresh the screen to confirm the status of the Content Group is now Generating:
Page Generator Pro: Generate: Server: Generating

Debugging

Caching, Performance and/or Optimization Plugins

Any caching, performance and/or optimization Plugins must be deactivated for Generate via Server functionality to run unaffected.

Install the Crontrol Plugin

Install the Crontrol Plugin, and check for the page_generator_pro_generate_cron task immediately after clicking Generate via Server for the applicable Content Group.

Enable Plugin Logging

  1. Enable Logging in the Plugin’s Settings.
  2. Review the Logging Documentation to search for logs related to the applicable Content Group.

Enable WordPress Logging

  1. Enable error logging to WordPress’ wp-content/debug.log by adding/modifying the following lines in your wp-config.php file:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
  2. Review both Plugin and WordPress logs, and make a note of any errors or warnings.
Your debug.log file may contain warnings and errors from WordPress and other Plugins.  It’s best practice to resolve these with your Theme, Plugin or Host Provider

Common Issues

Not all Pages are Generated

Whilst every best effort is made for the Generate via Server WordPress Cron task to run for as long as possible, it is subject to your web host’s configuration and limits on the maximum execution time of scripts and available memory.  It therefore may be forced to stop before all pages are generated.

Please work with your host to permit longer running times for WordPress’ wp-cron.php script, or use the CLI command.

WordPress’ Cron is disabled due to DISABLE_WP_CRON

If you see this notice when attempting to use the Generate via Server functionality, your WordPress installation has disabled WordPress’ Cron.

It must be enabled for this functionality – as well as other key WordPress tasks – to work.

Remove this line from you wp-config.php file:

define( 'DISABLE_WP_CRON', true );