A simple approach to local development for WordPress. Using this tool, you'll get a per-project installation of WordPress using Laravel's Homestead.
Have the requirements met below, then simply run:
npm install -g homepress homepress start
Homestead will ask if you want to add your new local dev site IP address to your hosts file. Hint: you do.
Have Node/NPM, Virtual Box and Vagrant
- Be on OSX or Linux (until someone does a PR for Windows)
- Virtual Box
- Have an ssh key in your
If you already have node, update it:
sudo npm cache clean -f sudo npm install -g n sudo n stable
Also Have Composer
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer
If you already had composer, update it!
homepress start OR
Update your WordPress Version:
Generate new WordPress salts:
Install VM Only (because you already have WordPress):
Start the VM:
Stop/Halt the VM:
SSH into the VM:
Bonus: Connecting to MySQL Manually
If you use a tool like Sequel Pro, you'll want to use these connection settings to connect to Mysql within the VM.
- Setup connection details:
- Host: 127.0.0.1
- User: homestead
- Password: secret
- Database: homestead
- Port: 33060
To develop and test this locally, simply do this:
git clone https://github.com/lasergoat/homepress.git cd homepress npm install cd ../ mkdir test cd test
Then, every time you edit a file in homepress, run this command:
cd ../homepress && npm link && cd ../test && homepress start
This will avoid creating vm and WordPress files within the homepress directory