Skip to content

The sexiest WordPress installation for developers (Composer for plugins, Eloquent ORM to extend the DB, _tk parent theme and _tk-child with a lot of examples, etc.)

Notifications You must be signed in to change notification settings

alesanchezr/wordpress-for-developers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordpress for Developers

Disclaimer: this is not a "customization" of the wordpress core. Not a single core file was harmed nor changed for this toolset. We follow the cardinal rule of Wordpress don't change the core. And we encourage you to do so.

This is the sexiest toolset built on top of Wordpress, it has all you need to start coding right away.

This is what makes it sexy:

  • Command and conquer: use the command line to install and manage wordpress (WP-CLI). That means no need for admin screens.
  • Organized package manager: use Composer as package manager for everything, including plugins. That means no need for admin screens.
  • Ignore the noise: it comes with the perfect .gitignore to only upload the necessary files.
  • Plus, some tech swag: it includes a few recommended plugins on composer.json; and a lot of examples on how to do stuff inside your wordpress.

Step by step usage

  1. Clone this repository and change the remote to your own repository (mind the dot at clone)
    $ git clone git@github.com:alesanchezr/wordpress-for-developers.git .
    
    $ git remote set-url origin your-repository-url-here

Note: if you are cloning into an existing wordpress installation you'll get the: destination path '.' already exists and is not an empty directory. Click here to solve.

  1. Install WP-CLI: http://wp-cli.org

    $ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    
    $ php wp-cli.phar --info

    You should see something like this:

    PHP binary:    /usr/bin/php5
    PHP version:    5.5.9-1ubuntu4.14
    php.ini used:   /etc/php5/cli/php.ini
    WP-CLI root dir:        /home/wp-cli/.wp-cli
    WP-CLI packages dir:    /home/wp-cli/.wp-cli/packages/
    WP-CLI global config:   /home/wp-cli/.wp-cli/config.yml
    WP-CLI project config:
    WP-CLI version: 1.2.1

    Now move it to the PATH

    $ chmod +x wp-cli.phar
    
    $ sudo mv wp-cli.phar /usr/local/bin/wp
    
    $ wp --info

    Again, you should see something like this:

    PHP binary:    /usr/bin/php5
    PHP version:    5.5.9-1ubuntu4.14
    php.ini used:   /etc/php5/cli/php.ini
    WP-CLI root dir:        /home/wp-cli/.wp-cli
    WP-CLI packages dir:    /home/wp-cli/.wp-cli/packages/
    WP-CLI global config:   /home/wp-cli/.wp-cli/config.yml
    WP-CLI project config:
    WP-CLI version: 1.2.1

    Note: Here you can find all wp commands

  2. Dowload wordpress latest version

    $ wp core download
  3. Generate configuration file (wp-config.php)

    $ wp core config --dbname=yourdatabase --dbuser=yourusername --dbpass=YOUR DATABASE PASSWORD
    • (Optional)Create database for your installation

      $ wp db create
  4. Install wordpress

    You will need the domain, title and admin information at hand.

    $ wp core install --url=domain.com --title="First Attempt" --admin_user=yourusername --admin_password=yourpassword --admin_email=your@email.com

Test your wordpress instalation: browse your-domain.com and (login) by going to your-domain.com/wp-admin

  1. If everything is ok, check your composer.json remove or add any plugins based on your taste and run:
$ composer install

Other steps

  • Lit the themes. Then change the theme
$ wp theme list
$ wp theme activate <theme_name>

Author

Alejandro Sanchez

Contributors

Ignacio Cordoba

License

This project is licensed under the MIT License

Do's and dont's of this installation

  • Do change the composer.json, and adjust it to your needs.
  • Don't change the Wordpress core
  • Do follow Wordpress' best practices.

More WordPress plugins?

From now on you should only install plugins available in the WPackagist project, don't worry, there are thousands of plugins in it. They are all validated.

https://wpackagist.org/search

If a plugin is no available, you can still install your own plugins if you want and nothing will break (unless you install crappy plugins) :)

About

The sexiest WordPress installation for developers (Composer for plugins, Eloquent ORM to extend the DB, _tk parent theme and _tk-child with a lot of examples, etc.)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published