What is Wocker?

Wocker is a local WordPress development environment. Since it’s based on Docker, it takes just 3 seconds to create every new installation of WordPress.

Get Started

1. Install Vagrant

http://www.vagrantup.com/

2. Install VirtualBox

https://www.virtualbox.org/

3. Install the vagrant-hostsupdater plugin.

$ vagrant plugin install vagrant-hostsupdater

4. Clone the Wocker Repository

$ git clone https://github.com/wckr/wocker.git && cd wocker

5. Start up Wocker

$ vagrant up

This could take a while on the first run as your local machine downloads the required files. Watch as the script ends, as an administrator or su password may be required. The first default container wocker will be running after the provision finishes successfully.

Note: on Windows, run Cmd, PowerShell or other terminals as an administrator.

6. Visit the following site in your browser

http://wocker.test/

Credentials and Such

WordPress

User:
admin
Pass:
admin

Database

Name:
wordpress
User:
wordpress
Pass:
wordpress

Synced Folder

Local machine:
data
Guest machine:
/home/bargee/data

Every container created through Wocker automatically has it’s volumes exposed on your local machine. Wocker exposes a container’s volume data under data/<container's name>.

Run a New Wocker Container (3 SECONDS)

Before running a new one, you must stop or remove the running Wocker container.

1. Connect to the guest machine via SSH

$ vagrant ssh

2. Stop or remove the running Wocker container

wocker ~ $ wocker stop CONTAINER

OR

wocker ~ $ wocker rm -f CONTAINER

CONTAINER can be a name or ID of a container. You can use wocker ps (Docker alias) to list only running containers.

If CONTAINER is omitted in wocker stop, all running containers will be stopped.

Note: the wocker rm -f command forcely remove containers and synced folders in your local data directory. Please back up the files before removing containers if you need them.

Example

wocker ~ $ wocker stop wocker

The first default container wocker will be running after your first vagrant up.

3. Use a Wocker command to run a new container

wocker ~ $ wocker run

You can use the name flag to assign a specific name to the container.

Example

wocker ~ $ wocker run --name test

Restart a Stopped Wocker Container (1 SECOND)

Before a restart, you must stop or remove the running Wocker container.

1. Connect to the guest machine via SSH

$ vagrant ssh

2. Stop or remove the running Wocker container

wocker ~ $ wocker stop CONTAINER

or

wocker ~ $ wocker rm -f CONTAINER

CONTAINER can be a name or ID of a container.

If CONTAINER is omitted in wocker stop, all running containers will be stopped.

Note: the wocker rm -f command forcely remove containers and synced folders in your local data directory. Please back up the files before removing containers if you need them.

Example

wocker ~ $ wocker stop test

3. Restart a stopped Wocker container

wocker ~ $ wocker start CONTAINER

CONTAINER can be a name or ID of a container. You can use wocker ps -a (Docker alias) to list all containers including stopped ones.

Example

wocker ~ $ wocker start wocker

Shut down Wocker

1. Exit SSH of the guest machine

wocker ~ $ exit

2. Shut down the guest machine

$ vagrant halt

Restart Wocker

1. Start the guest machine

$ vagrant up

2. Connect to the guest machine via SSH

$ vagrant ssh

3. Restart a stopped container or run a new container

wocker ~ $ wocker start CONTAINER

or

wocker ~ $ wocker run

CONTAINER can be a name or ID of a container.

Example

wocker ~ $ wocker start wocker