MainWP Blog

EWWW Image Optimizer - Constants
Tips & Tricks
Sebastian Moran

Useful Constants for the EWWW Image Optimizer Plugin

The EWWW Image Optimizer plugin is a commonly used plugin and service for optimizing images on your WordPress website. The plugin includes a large number of constants that can be defined in your site’s wp-config.php file. EWWW Image Optimizer Plugin If you want to enable the native lazy loading in the EWWW Image Optimizer plugin, then you can use this constant; define( ‘EIO_ENABLE_NATIVE_LAZY’, true ); To disable the lazy loader auto-scaler, you can use this constant; define( ‘EIO_LL_AUTOSCALE’, false ); To load the lazysizes.js file in the header rather than the footer, then use this constant; define( ‘EIO_LL_FOOTER’, false );

Constants for UpdraftPlus - WordPress Backup Plugin
Tips & Tricks
Sebastian Moran

Some Useful “Constants” for UpdraftPlus

If you are using the UpdraftPlus plugin for site backups then you can control a number of parts of the plugin using constants. Useful Constants for UpdraftPlus The constants for the UpdraftPlus plugin can be added to the site wp-config.php file. Adding constants to your site wp-config.php is possible using the code snippets extension of MainWP. You can also manually edit the site’s wp-config.php file to add the required constant to it. If you have larger database tables then you can set the backup for the database to always use binary MySQL dump using this constant; define(‘UPDRAFTPLUS_ALWAYS_TRY_MYSQLDUMP’, true); If you

Tips & Tricks
Sebastian Moran

Handy Wordfence Constants

Wordfence is a commonly used plugin for site security that has a free version and a premium version. Wordfence includes a number of constants that can be added to the site’s wp-config.php file to turn off specific features and change some of the defaults. MainWP has an easy-to-use code snippets plugin that will allow you to save these constants to any of the connected child sites into the child sites wp-config.php file. The Wordfence scan results page will show up to 100 results by default this can be increased or decreased by using the following constant and setting the value

Tips & Tricks
Sebastian Moran

Useful Code Snippets for the ShortPixel Image Optimizer

ShortPixel is a well-used plugin for image optimization on sites. The plugin includes a number of filters and constants. You can hide your ShortPixel API key from the plugin’s settings by defining the API key in a constant in the sites wp-config.php file. Replace out the APIKEY with your actual API key for ShortPixel. define(‘SHORTPIXEL_API_KEY’, ‘APIKEY’); define(‘SHORTPIXEL_HIDE_API_KEY’, true); If you are using the ShortPixel plugin and service on sites which are hosted on FlyWheel then you might run into an error saying that flock (file locking) has been disabled for security reasons by using this constant in your sites wp-config.php

Handy iThemes Security Constants
Tips & Tricks
Sebastian Moran

Handy iThemes Security Constants

iThemes Security plugin is an easy to use security plugin for your child sites. One of the lesser known things about iThemes Security is that the plugin includes a number of constants, which can be added to your child site’s wp-config.php file to set certain things on or off. MainWP has an amazing code snippets extension, which allows you to set constants from the MainWP Dashboard site. This means that any of these constants for iThemes Security plugin can easily be saved to any connected child sites. If you had issues with emails being sent from iThemes Security plugin, or

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.