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.
Note: EngineScript is currently in pre-release
The default EngineScript configuration utilizes the simplified stack below. Additional information on specific software versions and sources can be found further down.
| Function | Software |
|---|---|
| SSL Certificate Management | Cloudflare |
| CDN | Cloudflare |
| Web Server | Nginx |
| Script Processing | PHP |
| MySQL Database | MariaDB |
| Object Cache | Redis |
| CMS | WordPress |
| Firewall | UFW |
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)
- 30 minutes of your time
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.
Run the following command:
es.configYou'll need to edit the configuration file at /home/EngineScript/enginescript-install-options.txt. Fill this out completely, making sure to change all variables that say PLACEHOLDER.
Once 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) Configure New Domain, then select 1) Add Domain to create a new domain installation on your server.
Domain creation is almost entirely automated, requiring you to only enter the domain name you wish to create. During this automated process, we'll create a unique Nginx vhost file, create new MySQL database, request a new SSL certificate from Cloudflare, download WordPress, install and activate plugins, and assign the applicable data to wp-config.php.
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 finalize your installation:
- 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. You can also reach the admin section via IP address instead if you prefer.
- 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 - (Test this on your site, it can 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
- 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.
| 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 your server's IP address |
| /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.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.mysql |
Displays your MySQL login credentials in the terminal |
es.permissions |
Resets the permissions of all files in the WordPress directory (server-wide) |
es.restart |
Restart Nginx and PHP |
es.server |
Displays server information |
es.update |
Update EngineScript |
es.variables |
Opens the variable file in Nano. This file resets when EngineScript is updated |
Need a VPS? EngineScript recommends Digital Ocean