EngineScript automates the process of building a high-performance LEMP server. We've specifically built EngineScript with WordPress users in mind, so the install process will take you from a bare server all the way to a working WordPress installation with Nginx FastCGI cache enabled in about 30 minutes.
EngineScript Release Stage: Beta
EngineScript is meant to be run as the root user on a fresh VPS. Setup will remove existing Apache, Nginx, PHP, and MySQL installations. Things will break if you run this script on a VPS that has already been configured.
- A Newly Created VPS (Digital Ocean droplet recommended)
- Ubuntu 24.04 (64-Bit) (Ubuntu 22.04 is also supported but is not recommended)
- 2GB RAM
- Cloudflare (Free or Paid)
The default EngineScript configuration utilizes the simplified stack below. Additional information on specific software versions and sources can be found further down.
| CDN \ SSL: Cloudflare | Web Server: Nginx | ||
| Script Processing: PHP | MySQL Database: MariaDB | ||
| Object Cache: Redis | CMS: WordPress |
Run the following command:
wget https://raw.githubusercontent.com/EngineScript/EngineScript/master/setup.sh && bash setup.shAfter the initial setup script has run, you'll need to alter the install options file. Fill this out completely, making sure to change all variables that say PLACEHOLDER.
Run the following command:
es.configOnce you've filled out the configuration file with your personal settings, continue with the main installation process.
Run the following command:
es.installAfter EngineScript is fully installed, type es.menu in console to bring up the EngineScript menu. Choose 1) Domain Configuration Tools, then select 1) Create New Domain or 2) Import Domain to get started adding your first site to the server. If you're moving an existing site into EngineScript, the Import Domain function is fairly robust and should help simplify the process quite a bit.
Before your site is ready to use, you'll need to go into Cloudflare to configure a number of important settings. Follow the steps below to configure Cloudflare for your domain.
- Select your domain
First, we need to add a new CNAME record for admin.YOURDOMAIN. This will allow you to access the admin subdomain on your site. If you prefer, the admin control panel may also be accessed via IP address instead.
- Click Add record button
- Type: CNAME | Name: admin | Target: your domain
- Always Use HTTPS: Off - (Important: This can cause redirect loops)
- HSTS: On - (Optional)
- Minimum TLS Version: TLS 1.2
- Opportunistic Encryption: On
- TLS 1.3: On
- Automatic HTTPS Rewrites: On
- Certificate Transparency Monitoring: Optional
- Authenticated Origin Pulls: On
Go through each optimization tab and select the following:
- Speed Brain: On
- Cloudflare Fonts On
- Early Hints: On
- Rocket Loader: Optional - When enabled, this will disable Cloudflare's compression from origin functionality. Rocket loader can also cause issues with some plugins.
- HTTP/2: On
- HTTP/2 to Origin: On
- HTTP/3 (with QUIC): On - (Note: Cloudflare does not currently support HTTP/3 to Origin)
- Enhanced HTTP/2 Prioritization On - (Only available if you have Cloudflare Pro)
- 0-RTT Connection Resumption: On
- AMP Real URL: Optional
- Caching Level: Standard
- Browser Cache TTL: Respect Existing Headers
- Crawler Hints: On
- Always Online: On
- Tiered Cache Topology: Smart Tiered Caching Topology
- IPv6 Compatibility: On
- WebSockets: On
- Pseudo IPv4: Add Header
- IP Geolocation: On
- Network Error Logging: On
- Onion Routing: On
- gRPC: On
For Cloudflare to support compression from origin, the following features must be disabled:
- Email Obfuscation
- Rocket Loader
- Server Side Excludes (SSE)
- Mirage
- HTML Minification (JavaScript and CSS can remain enabled)
- Automatic HTTPS Rewrites
For more information, see This is Brotli from Origin.
- In WordPress, go to Settings >> Nginx Helper
- Check Enable Purge.
- Select "nginx Fastcgi cache" for Caching Method
- Select "Using a GET request to PURGE/url (Default option)" for Purging Method.
- Check all of the boxes under Purging Conditions.
- Save Changes.
EngineScript installs a number of additional plugins when a domain is added to the server. These plugins are purely optional, but may add some valuable functionality to your site. We only enable plugins that are required, so please take a moment to review all of the plugins to see if there is anything else you'd like to enable.
We've also developed a basic plugin that disables some bloat from the default WordPress experience such as TinyMCE emojis, Jetpack advertisements, and some legacy CSS from widgets and classic themes. There could be some edge-case scenarios where this breaks something specific you're using, but these tweaks are pretty safe for most users.
EngineScript development is supported by:
Want to support EngineScript? Sponsor this project.
| Location | Usage |
|---|---|
| /etc/mysql | MySQL (MariaDB) config |
| /etc/nginx | Nginx config |
| /etc/php | PHP config |
| /etc/redis | Redis config |
| /home/EngineScript | EngineScript user directories |
| /usr/local/bin/enginescript | EngineScript source |
| /var/lib/mysql | MySQL database |
| /var/log | Server logs |
| /var/www/admin/enginescript | Tools that may be accessed via server IP address or admin.YOURDOMAIN subdomain |
| /var/www/sites/YOURDOMAIN/html | Root directory for your WordPress installation |
| Command | Function |
|---|---|
es.backup |
Runs the backup script to backup all domains locally and optionally in the cloud |
es.cache |
Clear FastCGI Cache, OpCache, and Redis (server-wide) |
es.config |
Opens the configuration file in Nano |
es.debug |
Displays debug information for EngineScript |
es.help |
Displays EngineScript commands and locations |
es.images |
Losslessly compress all images in the WordPress /uploads directory (server-wide) |
es.info |
Displays server information |
es.install |
Runs the main EngineScript installation script |
es.menu |
EngineScript menu |
es.permissions |
Resets the permissions of all files in the WordPress directory (server-wide) |
es.restart |
Restart Nginx and PHP |
es.update |
Update EngineScript |
es.variables |
Opens the variable file in Nano. This file resets when EngineScript is updated |