CHT10

Getting Started

Getting Started

Introduction

Installation W3Speedster

  1. Go to Extend:
    • Log in to your Drupal site as an administrator.
    • Navigate to Manage > Extend.
  2. Install New Module:
    • Click on the Install new module button.
    • upload it from your computer.
    • Click on Install.
  3. Enable the Module:
    • Once installed, you will be redirected back to the Extend page.
    • Find the newly installed module in the list and check the box next to it.
    • Click the Install button at the bottom of the page.

Updating W3Speedster

  1. Go to Update:
    • Log in to your Drupal site as an administrator.
    • Navigate to Manage > Reports > Available updates.
  2. Check for Updates:
    • Click on the Check manually button to ensure you have the latest update status.
  3. Update the Module:
    • If updates are available, click on the Update tab.
    • Select the modules you want to update and click on the Download these updates button.
    • Follow the prompts to complete the update process.

Additional Tips

  • Backup: Always backup your database and files before installing or updating modules.
  • Maintenance Mode: Consider putting your site in maintenance mode while performing updates to prevent any disruptions to your users.
  • Drush: Drush is a powerful command-line tool for managing Drupal. Installing and using Drush can streamline many tasks.

Can’t upload/install W3Speedster

1. Check Compatibility

  • Drupal Version: Ensure the module is compatible with your Drupal version.
  • PHP Version: Check if the module requires a specific PHP version.

2. Read Error Messages

  • Details: Carefully read the error message displayed. It often provides clues about what went wrong.
  • Log Messages: Check the log messages by navigating to Reports > Recent log messages.

3. Clear Cache

  • Drush: Clear the cache using Drush:
    drush cr
  • Drupal UI: Navigate to Configuration > Development > Performance and click Clear all caches.

4. Check File Permissions

  • Ensure that the file and directory permissions are set correctly.
    find . -type d -exec chmod 755 {} \;
    find . -type f -exec chmod 644 {} \;
  • The web server needs write permissions for the sites/default directory.

5. Manually Download and Install the Module

  1. Download the Module:
    • Download the module from Drupal.org and extract it to the modules/contrib directory.
  2. Enable the Module:
    • Enable it using Drush:
      drush en module_name
    • Or via the Manage > Extend page in the Drupal UI.

6. Check PHP Error Logs

  • Inspect the PHP error logs for any issues. The location of the logs depends on your server setup:
    • Apache: /var/log/apache2/error.log
    • Nginx: /var/log/nginx/error.log
    • Local Development: Check the error logs in your development environment (e.g., MAMP, WAMP).

7. Disable Conflicting Modules

  • Conflicts with other modules might cause issues. Try disabling other modules that might be interfering.

8. Update Drupal Core and Modules

  • Ensure that your Drupal core and all other modules are up-to-date. Use Composer for updates:
    composer update drush updb drush cr

9. Check .htaccess and Settings.php

  • Ensure that .htaccess and settings.php are correctly configured and have not been altered incorrectly.

10. Consult the Module’s Issue Queue

  • Visit the module's page on Drupal.org and check the issue queue for similar problems and possible solutions.

General Settings

License Key

To use your licensed plugin, you must enter a license key. This key is unique for each product and is automatically generated when your plugin order is completed. You will find the key in the "Order Completed" email from W3Speedster. Activating the key ensures you receive updates and access to all plugin features.

Turn On Optimization

When you turn on this field, the W3Speedster Plugin will optimize your site by applying all the optimization settings. If this settings is turned off, no settings in w3speedster plugin will apply except html caching.

Optimize pages with Query parameters

This enables the optimization to be shown on the pages with query parameters when the optimization is live. For eg. https://www.example.com?nocache=1 will show optimized page if this setting is turned on. It is recommended only for servers with high performance.

Optimize pages when User Logged In

Enabling this option will optimize pages even when a user is logged in. Use this feature with caution, as it may affect the performance of dynamic or personalized content for logged-in users. Ensure that the optimization does not interfere with user-specific functionalities or content.

Separate javascript and CSS cache for mobile

This will create separate JavaScript and CSS cache for mobile. All css and javascript files will have mob.css at the end only for mobile(.css for desktop) and also separate Critical CSS will be created for Mobile and desktop.

Fix INP Issues

"Fix INP Issues" refers to addressing problems related to the "Interactive Next Paint" metric. By enabling this feature, you can resolve issues identified in Google PageSpeed Insights and/or Google Search Console related to the time it takes for your site to become fully interactive. This helps improve your website's performance and user experience.

CDN Settings

CDN URL

Enter the CDN (Content Delivery Network) URL that you have purchased for your site. This URL will be used to serve static assets like images, CSS, and JavaScript files, helping to improve your site's performance and load times by distributing content across multiple servers.

Exclude file extensions from cdn

During the implementation of the CDN, our plugin provides a section to exclude the specific extensions so that the functionality of site is not hampered, for instance, excluding ‘Font Extensions’ like (.woff, .ttf, .eot, .woff2) might be required because cross origin request for fonts are not allowed in many sites and allowing of fonts from external source has to done manually.

Exclude path from cdn

During the implementation of the CDN, our plugin provides a section to exclude the specific paths so that the work of the plugin is not hampered, for instance, excluding ‘/wp-includes/’.

Image Optimization

Optimize JPG/PNG Images

Enable image optimization by clicking the button. Once activated, images will be optimized in the background through wp-cron, provided the ‘Optimize Images via wp-cron’ option is enabled. This process helps improve your site’s performance by compressing images without losing quality.

JPG/PNG Image Quality

The W3Speedster Plugin maintains a standard image quality of 90% to preserve the clarity of your images. However, you can adjust this setting to meet your preferences, balancing image quality with file size according to your needs.

Enable JPG Webp support

This feature will convert and render your JPG images in the WebP format. To use it, make sure to start image optimization in the Image Optimization tab. The W3Speedster Plugin will handle the optimization for all JPG images, enhancing your site’s performance

Enable PNG Webp support

This feature will convert and render your PNG images in the WebP format. To use it, make sure to start image optimization in the Image Optimization tab. The W3Speedster Plugin will handle the optimization for all PNG images, enhancing your site’s performance

WebP Image Quality

The W3Speedster Plugin uses a standard quality of 90% for WebP images to maintain their clarity. You can adjust this setting to suit your needs, balancing image quality with file size.

Enable Image lazy Load

The W3Speedster Plugin allows you to enable lazy loading for images. This feature ensures that images are loaded only as they come into the user's viewport, significantly improving your site's performance and reducing initial load times.

Enable Iframe lazy Load

With the W3Speedster Plugin, you can also enable lazy loading for iframes. By delaying the loading of iframes until they are needed, your site can load faster, offering a smoother and more efficient user experience.

Enable Video lazy Load

Enable lazy loading for videos using the W3Speedster Plugin. This feature loads video content only when it becomes necessary, helping to speed up your site's initial load time and provide a better performance overall.

Enable Audio lazy Load

Enable lazy loading for audio using the W3Speedster Plugin. This feature loads audio content only when it becomes necessary, helping to speed up your site's initial load time and provide a better performance overall.

Pixels to Load Resources Below the Viewport

The W3Speedster Plugin defaults to starting the loading of resources such as images, videos, iframes, background images, and audio when they are 200 pixels below the viewport. You can adjust this setting to start loading these resources earlier, so they appear more quickly as you scroll. For example, you can enter a value like 200 to set the distance from the viewport where loading begins.

Load SVG Inline Tag as URL

Load SVGs as URLs instead of inline tags to avoid creating large DOM elements. This approach helps improve performance by reducing the size of the DOM and simplifying your page structure.

Optimize Images on the Go

This feature automatically optimizes images as site pages are crawled. The W3Speedster Plugin captures unconverted and unoptimized images when you visit a page and optimizes them in the background. This ensures that all images used on the site are prioritized for optimization. However, it is recommended to turn off this feature after the initial crawl and optimization to prevent unnecessary server load.

Automatically Optimize Images on Upload

This feature automatically optimizes and converts new images to WebP format as soon as they are uploaded. If you notice that image uploads are taking longer than expected, you may want to turn off this feature. Ensure that the settings for image optimization and WebP conversion are also enabled to use this feature effectively.

Responsive Images

The W3Speedster Plugin creates responsive images that adjust the background image of your webpage based on the user’s screen size, such as mobile, tablet, or desktop. This ensures that your images look optimal on all devices.

Insert Aspect Ratio in img Tag

This feature allows you to specify the aspect ratio for images directly within the img tag. By including the aspect ratio, you ensure that the space for the image is reserved on the page even before the image is fully loaded. This helps prevent layout shifts and improves the overall user experience by maintaining consistent image dimensions across different devices and screen sizes.

Upload Directory Path for Images

Please enter the folder path where you have the images you want to optimize. Once you enter the folder path, all images in the directory will be processed and optimized automatically. This way, images are reduced in size without any loss of quality, making them more efficient for use in web or other applications.

Calculate Image

The module will analyze and identify the images within the specified directory that require optimization. Once the directory path is provided, it will evaluate all images contained in the directory to determine which ones can be optimized for better performance. This process ensures that only relevant images are selected for optimization, streamlining the workflow and enhancing efficiency.

Start Image Optimization

By starting image optimization, the plugin will compress and optimize images on your site to enhance performance.

  • Free Version: The first 500 images will be optimized.
  • Pro Version: Unlimited images will be optimized.
Activate the Pro Version to remove the limit and optimize all images on your site.

CSS Optimization

Enable CSS Optimization

Enable this to start CSS optimiation. All css optimization like minification, critical css generation, custom css etc will show only when this option is turned on.

Combine Google fonts

The W3Speedster Plugin loads and combines all Google Fonts used on your site and loads it together preventing multiple requests. If critical css is generated, all required google fonts are loaded instantly and rest are lazyloaded ie. loads on user interaction. If you still want to load any font upfront and then you can write its css in custom css code section provided by the plugin.

Load Critical CSS

The W3Speedster Plugin generates Critical CSS which loads upfront and let all css files to load to user interaction enabling faster loading of the page.

Load Critical CSS in Style Tag

This option will load critical css in style tag instead of link tag. This option is not recommended for site with large page size. Implementing CDN will help a lot in speeding of site if this option is not enabled.

Start generating critical CSS

This feature creates critical CSS for your website to improve page load performance. Just click on the button, it will automatically crawl almost all the pages and create critical css on its own. Critical css generation is pretty fast like 10-15 mins but may take more time with site with thousand of pages. In the Free Version, critical CSS will be generated only for the homepage. With the Pro Version (activated license key), unlimited critical CSS can be generated for your entire site.

Load Style Tag in Head to Avoid CLS

This feature allows style tags to load in the head section, fixing the Cumulative Layout Shift (CLS) of the page. To use it, simply add the ID of each style tag in the provided box and save your changes. Ensure that each style tag ID is entered on a new line.

Javascript Optimization

Enable Javascript Optimization

Enable this box to start JavaScript minification, a feature provided by the W3Speedster Plugin that optimizes your site's performance.

Lazyload Javascript

This option allows you to choose when to load JavaScript on your site. Enabling lazy loading for JavaScript can improve your site's initial loading speed by deferring the loading of JavaScript files until they are needed. Select "Yes" to enable lazy loading, or "No" to load JavaScript files immediately with the rest of your site's content. This helps balance performance and functionality based on your site's needs.

Load Javascript Inline Script as URL

Enter the matching text of the inline script URLs that you want to exclude from deferring JavaScript. Each exclusion should be entered on a new line. This allows you to specify which inline scripts should not be deferred, ensuring they load immediately to maintain essential functionality.

Exclusions

Preload Resources

If you want to preload resources such as images, CSS, JavaScript, or fonts, simply enter the complete URL of each resource in the 'Preload Resources' section. Each URL should be on a separate line. This ensures that the specified resources are loaded ahead of time, which can improve your site's performance.

Exclude Images from Lazy Loading

To prevent specific images from being lazy-loaded, you can exclude them by providing their URL, class name, ID, or alt attribute in the designated section. For example, you can enter "xyz.png" for a specific image or "nolazy" for images with a particular class name. This allows those images to load normally while others benefit from lazy loading.

Force Lazy Load Javascript

To improve performance, you can force lazy loading for JavaScript which takes a long time to load. Enter specific words, IDs from inline script tags, or parts of script URLs in the provided section. For example, you might use identifiers like "Facebook" or "Instagram" to target and lazy load those scripts. This helps reduce loading times and improves your performance score.

Exclude Javascript Tags from Lazyload

With the W3Speedster Plugin, you can exclude specific JavaScript files from lazy loading and minification by entering their URLs in the relevant section. For example, if you have a JavaScript file like xyz.js that you do not want to lazy load or minify, simply provide its URL. This ensures those scripts are loaded normally while other scripts benefit from optimization.

Exclude Inline JavaScript from Lazy Load

This feature allows you to exclude specific inline JavaScript from being lazy-loaded. For example, you might want to exclude scripts like ‘Google Analytics’ to ensure they load immediately and function correctly without delay. This helps maintain essential functionalities while still benefiting from lazy loading for other scripts.

Exclude Pages From Optimization

To exclude specific pages from optimization, simply enter their URLs in the designated section. For example, you can list pages like /cart or /login that you do not wish to optimize. This ensures that these pages are left out of the optimization process while the rest of your site benefits from performance improvements.

Exclude Pages from CSS Optimization

To exclude specific pages from CSS optimization, enter the URL or a part of the URL where you do not want the CSS optimization to be applied. List each URL or URL fragment on a separate line to ensure those pages are excluded from the optimization process.

Exclude Page from JavaScript Optimization

With the W3Speedster Plugin, you can exclude specific pages from JavaScript minification and lazy loading by entering the script URLs or parts of the script URLs. Simply list each URL or URL fragment on a separate line. This allows you to ensure that certain pages or scripts are not affected by the optimization process.

Custom Code

Custom CSS to Load on Page Load

If you wish to preload any custom CSS that should be applied immediately when the page loads, add it in this section without including the <style> tags. This CSS will only take effect when CSS optimization is enabled, ensuring that your custom styles are loaded efficiently along with the optimized CSS.

Custom JavaScript to Load on Page Load

If you wish to preload any JavaScript, add the code in this section without including the <script> tags. Enter the JavaScript code that needs to be loaded before the page fully loads. You have two options for loading:

  • As File: Loads the script as a file.
  • Defer: Defers loading of the script until after the initial page load.
Choose the appropriate method based on your requirements to ensure optimal performance and functionality.

Custom JavaScript to Load After Page Load

If you wish to load any JavaScript after the page has fully loaded or based on user interaction, add the code in this section without including the <script> tags. This JavaScript will be executed after the page load, ensuring it does not interfere with the initial rendering of the page. Enter the JavaScript code that should run post-page load in this section.

Cache

Delete JS/CSS Cache

The plugin lets you delete the combined and minified cache for JavaScript and CSS. This ensures that any changes made to your theme or plugin files are updated and reflected on your site.

Delete Critical CSS

The W3Speedster WordPress plugin allows you to delete Critical CSS. This should be done only when you make changes to the styles used in the upper part of your webpage. Deleting Critical CSS will clear the cache and require regeneration, which may take some time depending on the number of pages on your site.