Wordpress site building with Timber and TailwindCSS
- Go to your existing Wordpress site and create a new composer.json file in your root folder. Example
- Create
src\SITE
folder in your root folder. This is where all your site specific classes (post type definitions, blocks, commands, migrations, etc.) belong. - Run
composer install
to get PHP dependencies - Put this snippet into
wp-config.php
orfunctions.php
or a custom plugin to load the composer libraries
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once(__DIR__ . '/vendor/autoload.php');
}
- Run
composer run theme
to install the starter theme - Go into the new theme's folder and run
npm install
and thennpm run dev
to make sure your build system is working. - Activate the theme in Wordpress. For more information on the theme have a look at the README.md in the theme directory.