The setup installs the following software:
- Nginx
- MySQL
- PHP
- Node
- Composer
| server { | |
| ## Your website name goes here. | |
| server_name domainname.com www.domainname.com _; | |
| ## Your only path reference. | |
| root /var/www/; | |
| listen 8080; | |
| ## This should be in your http block and if it is, it's not needed here. | |
| index index.html index.htm index.php; | |
| include conf.d/drop; |
| <?php | |
| // Based on <https://github.com/mecha-cms/x.minify> | |
| namespace x\minify\_ { // start namespace | |
| $n = __NAMESPACE__; | |
| \define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
| \define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
| <?php | |
| /** | |
| * Fixes issue where JS is halted on ACF admin pages when WP Media Folder is activated. | |
| * | |
| * These are the versions of the plugins I had when I tried | |
| * - WP Media Folder - 1.0.4 | |
| * - Advanced Custom Fields Pro - (5.1.8, 5.2.1) | |
| * | |
| * |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Which Browser?</title> | |
| </head> | |
| <body> | |
| <p>You are using <span id="browser"></span> <span id="version"></span> on <span id="os"></span></p> | |
| <script type="text/javascript" src="browserdetect.js"></script> | |
| <script type="text/javascript"> |
| <?php | |
| // This code is based in Mathew Horne blog post: https://matthewhorne.me/defer-async-wordpress-scripts/ | |
| //function to add async attribute | |
| function add_async_attribute($tag, $handle) { | |
| $scripts_to_async = array('my-js-handle-async', 'another-handle-async'); | |
| //check if this script is in the array | |
| if (in_array($handle, $scripts_to_async)){ | |
| //return with async | |
| return str_replace(' src', ' async="async" src', $tag); |