Upload
ivelina-dimova
View
237
Download
0
Embed Size (px)
Citation preview
➢ Ruby >= 1.9.3 (JRuby and C-Ruby/YARV are supported)
➢ Capistrano support these source code version control systems out of the box:○ Git 1.8 or higher○ Mercurial○ SVN
Requirements
Mercury Vagrant
“Mercury project is meant to allow people in the
WordPress community to run a single Vagrant for developing, debugging, and deploying HHVM
based code.”
Requirements
➢ Git➢ Virtual machine software (VMware or VirtualBox are
recommended)➢ Vagrant➢ Node➢ Vagrant Ghost plugin - for automation of hosts file updates
Local Install Set-Up
New project folder in hgv/sites provisioning/default-install.yml → hgv_data/config/sites/default.ymlConfig the yml file
Run vagrant provision.
What do you get?
➢ Fresh WordPress install with some useful plugins
➢ All config files set up➢ DB set up ➢ Debug tools➢ ssh access to the vagrant files➢ caching if needed – Memcache / Varnish
WP CLI
WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up
multisite installs and much more, without using a web
browser.
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('sign in');
$I->amOnPage('/login');
$I->fillField('username', 'davert');
$I->fillField('password', 'qwerty');
$I->click('LOGIN');
$I->see('Welcome, Davert!');
?>
Selenium WebDriver
Selenium-WebDriver was developed to better support dynamic web pages
where elements of a page may change without the page itself being reloaded.
WebDriver’s goal is to supply a well-designed object-oriented API that provides
improved support for modern advanced web-app testing problems.
Selenium-WebDriver makes direct calls to the browser using each browser’s
native support for automation.
wp-browsermodules:
enabled:
- WPBrowser
config:
WPBrowser:
url: 'http://example.local'
adminUsername: 'root'
adminPassword: 'root'
adminUrl: '/wp-core/wp-admin'
Usage// login as administrator using username and password
public function loginAsAdmin();
// login as user
public function loginAs($username, $password);
// go the plugins page
public function amOnPluginsPage();
// activate a plugin from the plugin page
public function activatePlugin($pluginSlug);
// deactivate a plugin from the plugin page
public function deactivatePlugin($pluginSlug);
Features
➢ Different stages of deployment
➢ Secure deployment via SSH
➢ Sets different WordPress versions on server
➢ Symlinks to protect not deployed folders
➢ Backups
➢ Roll Back
git push
Add remote locally
- check remotes – git remote -v
- add remote – git remote add <your repo ssh link>
git push <branch name needed>
Resources1. http://capistranorb.com/2. http://codeception.com/3. https://github.com/wpengine/hgv4. https://wp-cli.org/5. https://github.com/danielbachhuber/wp-rest-cli6. https://github.com/lucatume/wp-browser