Start a WordPress project with Timber using Pine CLI Tool

Last Updated at : July 25, 2017 By - Usama Muneer | 2052

    If you develop WordPress projects more often and if you‘re pretty familiar with using Timber Library to create and manage your WordPress themes then this tool will definitely enhance your productivity and saves you a bunch of time doing things repeatedly while creating a new theme.

    Recently i came across this awesome tool called Pine, Its a CLI tool for creating and providing a perfect boilerplate for WordPress to start theming with Timber straight out of the box with just a single command. So let’s see how it works.

    Installing Pine

    First thing first, we have to install Pine globally in our machines to make it work and for that you gotta need Composer installed.

    Make sure you have $HOME/.composer/vendor/bin/ directory added in your environment variables.

    $ composer global require azi/pine

    Wait for it to install completely then move on to the next step.

    Running Pine

    Once its installed you can run the following command by typing in:

    $ pine new timberproject

    The above command will create a directory “timberproject”, other than that it downloads & installs WordPress for you and creates a theme directory with the same name and most amazingly creates all the required directories inside your theme folder for you in no time.


    I’m excited to try out this awesome tool now, so let’s begin.

    Step 1: Installing Pine using Composer

    installing pine using composer

    Step 2: Creating new WordPress Project using Pine

    creating new WordPress project with Pine

    So if you look closely, Pine downloads a fresh WordPress instance for you, pulling in a few dependencies including timber/timber and twig/twig.

    What’s Inside?

    Now It’s time we can peek inside of our newly created WordPress theme directory and what Pine has brought for us so far.

    cd into my themes directory

    Now if we list down the elements inside our theme directory, we can see a new theme directory namely “timberproject” has already been created for us.

    new directory timberproject

    Now if we look inside of our newly created theme directory. It has already come up with a boilerplate and we should be good to go.

    As you can see, it creates every bunch of required file and directory for you to get started.

    Simple Enough eh?

    Now I’ll leave the rest for you. Go through every bit of it and activate your theme from your WordPress dashboard and build something awesome.

    If you have any questions, leave me a comment below or you can ask straight to the Developer of Pine @azibaloch.

    If you liked this tool and found it useful then don’t forget to leave a star on Github.

    Moreover if you liked this article, press the heart button and let me know.

    blog user
    Usama Muneer

    A web enthusiastic, self-motivated & detail-oriented professional Full-Stack Web Developer from Karachi, Pakistan with experience in developing applications using JavaScript, WordPress & Laravel specifically. Loves to write on different web technologies with an equally useful skill to make some sense out of it.

    Related Posts

    Laravel Live Islamabad, ended on 24th Nov'18 & we got a lot to learn from the top-notch of speakers & influencers. Thanks to the sponsors for pulling off such a great event in the capital of Pakistan.

    Previously Localization in Laravel was done by creating separate directories for each locales and place in under resources/lang/ and add key value pairs to every single keyword in a number of files as per their modules.

    Another #LaraconUS in the books & It was the 6th instalment of #LaraconUS happened at Chicago with full swing & we got a lot to learn this time with exceptional line of speakers and never-ending community support by fellow Artisans

    Laravel is one of a famous and widely used PHP framework which is growing with immense pace since its version 4.2. Learning Laravel & Setting up your application locally is not much of a difficult task but when it comes to deployment, developers often find it a bit tricky to handle.