Skip to content

Deployment

Move to production

Share your new WordPress theme with the world

Deployment via zip archive

To package your theme as a zip archive, you can use the bundle command:

npm run bundle

This command will first execute npm run prod and then create a zip archive from your theme folder, in a file named after your theme slug.

The resulting theme archive can be uploaded directly to a WordPress site. Since WordPress 5.5, uploading a theme that has already been installed will result in an option to overwrite the existing theme, providing a viable path for quick deployments.

Other deployment options

When deploying via other means, you’ll need to keep three things in mind:

  • You should always run npm run prod before deploying
  • Generated files (like style.css and script.min.js) aren’t committed to git by default
  • Only the ./theme folder should be deployed to production

If you’d like to deploy from the command line, Deployer and Capistrano are both great solutions for the command-line deployment of WordPress themes. SpinupWP also has a detailed look at Deploying WordPress using the Command Line showing several different techniques.

GitHub Actions and Envoyer are excellent options as well.


All Documentation

  • Quickstart
    Get started quickly, and deploy to production sooner than you expect
  • Installation
    Generate your custom theme, install it in WordPress and run your first Tailwind builds
  • Development
    Watch for changes, build for production and learn more about how _tw, WordPress and Tailwind work together
  • Deployment
    Share your new WordPress theme with the world