When it comes to WordPress development on your local machine, a very quick and easy way to get started would be to use a Vagrant box, particularly a Homestead box. Homestead is a Laravel ready-made vagrant box that enables the user to very quickly get the Vagrant machine up and going with everything needed to run a Laravel. I use Laravel everyday, but I also develop sites in WordPress, so it makes sense that I would want to run WordPress on my Homestead box. Here's how you can add a WordPress install to an existing Homestead box. If you run into any problems, leave me a comment and I'll do my best to help. If you need to get Homestead running, try following the Laravel Homestead documentation to get that going. First off, you'll need to start your homestead box and SSH into it. You can use putty or you command line. Once you're in the vagrant box, cd into the /home/www folder.
cd /home/www wget http://wordpress.org/latest.zip unzip latest.zip
That will create a wordpress folder in the /home/www directory. Change the folder to the name of your new project.
mv wordpress yourdomain cd /etc/nginx/sites-available
Copy one of the existing configs to a new file based on your project name.
cp existing.conf yourdomain.conf
Edit the new config file.
nano yourdomain.conf
change the root directory location to the yourdomain folder. The final entry should read /home/www/yourdomain for a Wordpress site.
Save the edits
CTRL + X and follow prompts to save the file. cd ../sites-enabled ln -s ../sites-available/yourdomain.conf . service nginx restart
Change your hosts file to point to the new test environment. Make sure you're opening notepad as an admin user on Windows (right click notepad and select "Run as Administrator"). Add the entry for your new domain, using .test as the TLD yourdomain.test
192.168.10.10 yourdomain.test
Make a mysql database for Wordpress to use.
mysql -uhomestead -psecret create database yourdomain; quit;
Add the database values to the new Wordpress install.
cd /home/www/yourdomain cp wp-config-sample.php wp-config.php nano wp-config.php
Add the database credentials to the database, using user homestead, password secret, and the database (e.g. yourdomain) recently created for the project.
CTRL + X to save the file. Follow the prompts to complete the save.
Open the site in your browser. It should resolve. If not, make sure there's no typos in your configuration file. If there is, ensure you restart nginx after making any changes.