Web Server Configuration

  • Place your production files from dist directory on your web server, or set this directory as the root.

  • Configure your web server to redirect all URL requests to the index.php file, unless the requested file or directory physically exists on the server.

For example, on Apache, we add this in src > front > template > .htaccess : (webpack will send your file from your src directory to dist )

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]

The dist directory is created when you install WordPress with the npm run get:wp command and is populated throughout your progress.

Last updated