Production
Compile the assets files
For create a production version for all assets files, run this command in the terminal :
npm
npm run build
all compiled (js, css, img) files are in
dist
folder.Define the environment
Don't forget to change in the file wp-config.php
, this declarations :
// for production
define('WP_ENV', 'production');
Assets Files
The files are automatically injected into website. The files are a hash versions in name to avoid cache problem.
Table of Contents