mrdavidlaing / pressupbox-development-boilerplate

Patterns and practices for teams to collaborating on WordPress projects
Other
1 stars 5 forks source link

Integrate wp-cli #23

Open mrdavidlaing opened 11 years ago

mrdavidlaing commented 11 years ago

http://wp-cli.org/

Possibly as part of the buildpack?

This gives us the following features:

  1. Unit test support
  2. a Wordpress shell
  3. Easy plugin installation
  4. DB import / export
mrdavidlaing commented 11 years ago

Grr. It appears that wp-cli doesn't work with hiphop-php. Thus using it requires us to:

  1. Patch wp-cli
  2. Install PHP 5.3+
daithi-coombes commented 11 years ago

hiphop is return php version 5.4 and think I may have found away to get wp-cli to work:

create wp-cli.yml in ~/dist/public/wordpress', then cd into the directory and runwp`. Prints out the available commands. Will research further and look into:

might fix #22 Integrate Automatic Testing

daithi-coombes commented 11 years ago

wp shell works:

in file ~/dist/public/wordpress/wp-cli.yml

path: /home/vagrant/dist/public/wordpress/
$ wp shell
PHP Notice:  Undefined index: HTTP_HOST in phar:///usr/bin/wp/php/wp-cli
.php(21) : eval()'d code on line 23
PHP Notice:  Undefined index: HTTP_HOST in phar:///usr/bin/wp/php/wp-cli
.php(21) : eval()'d code on line 24
Type "exit" to close session.
wp> get_bloginfo('url')
'http:'
wp> $_.'/feed'
'http:/feed'
wp> exit
vagrant@precise64:~/dist/public/wordpress$

I'm getting the PHP Notice on all calls to the wp-cli, think it param HTTP_HOST needs to be set in wp-cli.yml Get the core version:

$ wp core version
PHP Notice:  Undefined index: HTTP_HOST in phar:///usr/bin/wp/php/wp-cli.php(21) : eval()'d code on line 23
PHP Notice:  Undefined index: HTTP_HOST in phar:///usr/bin/wp/php/wp-cli.php(21) : eval()'d code on line 24
3.5.1
vagrant@precise64:~/dist/public/wordpress$