Skip to content

WordPress WP Rocket

INFO

WP Rocket is a performance optimization plugin for websites built on the WordPress platform. This plugin helps increase website loading speed by optimizing elements like cache, CSS and JavaScript files, images, and others. WP Rocket provides a simple user interface for configuring and managing optimization settings, making it possible for users to improve site performance without needing to be an expert in programming or administration. system.

Enable Nginx configuration for WP Rocket

  1. Make sure the WP Rocket plugin is installed in WordPress Admin

  2. Return to the FlashPanel site dashboard, click the Nginx WordPress Rocket tile

  3. Press the Enabe button

  4. Confirm results

    1. Open the browser, press F12 to open the Development Tools panel, select the Network tab
    2. Enter your website address
    3. If you see X-Rocket-Nginx-Serving-Static: HIT is OK

Configure WP-Cron

WARNING

Once WP Rocket is configured, when the user accesses, the files the user receives are cached files without having to execute any PHP from WordPress, which can cause failed jobs. Your scheduler is not called. As you may already know, WP-Cron jobs are not true cron jobs and are only executed when you have visits to your site.

To ensure your scheduled tasks run when needed, we recommend that you disable WordPress cron jobs and create a true cron job.

  1. Open the wp-config.php file further

    php
    define( 'DISABLE_WP_CRON', true );

  2. Open CronJobs tab and add

  3. You add the following:

    • Command: cd /home/flashvps/main3.chungnguyen.xyz; php8.2 wp-cron.php in which /home/flashvps/main3.chungnguyen.xyz you change to the corresponding path php8.2 is the current php version being used for this website.
    • User: corresponds to the user of the current website
    • Cron Expression: in minute, change to */15
  4. Press the Create CronJob button