WordPress must use plugins

They are a great way of "foolproofing" a website.

Aaron Fryer

TypeScript Developer with an afro. Developer at PACSTools.

Feb 4, 2020 - 1 min read

What are must use plugins? Must use plugins are plugins that cannot be deactivated and are essential for the website to function correctly. These are a great way of “foolproofing” your website for a client.

What are the positives? Cannot be deactivated Are not visible in the main plugin list so are “invisible” to a client They are loaded before regular plugins

What are the negatives? WordPress looks for PHP files and not files in folders so plugins need to be loaded in. Updates need to be manually – this isn’t a negative in the “idiotproofing” sense but when we do site maintenance we would have to manually check if a plugin has updates.

What is the use case? Lets say our website requires certain plugins and cannot function without them such as Timber and Gravity Forms. We want to ensure that they are always on and the client doesn’t update them (especially timber). We would place these in our mu-plugins folder.

How do we implement must use plugins? Lets start by navigating to our wp-config folder and create a folder next to our plugins folder called mu-plugins. Inside mu-plugins create a .php file Inside that file include your plugin files like so:

<?php
require_once(__DIR__ . '/timber-library/timber.php');

And you should now have Timber loaded as a must use plugin.

Hooking up your gravity form to dotmailer

This is part of a series of tutorials about things I have learnt on the job and that I feel are worth sharing back out to the community. So…

Read more…

Sending Form Data via AJAX

Ever wanted to send form data via AJAX? A great and easy way to do this is via FormData. Requirements: HTML: Any form will do. JavaScript…

Read more…