-
Notifications
You must be signed in to change notification settings - Fork 365
Closed
Description
The largest files to load for the initial paint are:
wp.data– 13M – the WordPress installation and all its php filesphp-web.wasm– 6.2M – the WebAssembly PHP buildwp.js– 182k – the emscripten-generated JS loader forwp.dataphp-web.js– 153k – the emscripten-generated JS loader forphp-web.wasmphp-webworker.js– 153k – same as above, but for the webworker backend
Let's shrink them as much as possible.
Here's a few ideas:
- Minify the variable names in the PHP files
- Minify the JSON files
- Remove non-english translations
- Identify PHP dependencies to remove, e.g. libxml2 doesn't seem necessary
- libxml2 was removed from the default build in db0a477
- Compress the
.dataand.wasmfiles using brotli compression – props to @eliot-akira. Edit: Web servers take care of it and most browsers support the brotli compression! - Consider disabling script/style concatenation #39 – done in Don't include static files in the build. #43 – reduced
wp.datafrom 43M to 13M! - Minify the PHP files
- Remove themes other than twentytwentytwo
- Remove unminified JS and CSS files
- Remove the
.eot,.gif,.htaccess,.md,.mp4,.png,.scss,.stylelintignore,.svg,.ttf,.txt,.woff, and.woff2files