
Whatever the case, note the command that you use and the output that you use so that you’re able to update your profile with this. $ ls /Applications/MAMP/bin/php/ | sort -n | tail -2 | head -1 If you’re interested in using a different version then you can use a command line the following (which will result in php5.6.10): This should result in the following output: $ ls /Applications/MAMP/bin/php/ | sort -n | tail -1 To get the most recent version of PHP, you can enter the following line in Terminal: For this post, I’m assuming that you’re running MAMP and that you’ll be installing it in the directory corresponding to the version of PHP you’re using the most. If you’re interested in doing that, then follow along. Specifically, if you have your environment running (through something such as MAMP or another stack), then you may wish to keep all of your files self-contained within their directories so not to interfere or conflict with other software on the system. Instead, I’m providing a way of installing the program in the context of your system that may be a bit different from what the standard set of instructions offer. I’m not out to say it’s wrong, that I have a better way, or to repeat the information.
#MAMP WORDPRESS INSTALLATION HOW TO#
But WP-CLI offers a much easier way to go about doing just that in a more automated manner.īut first, it’s important to make sure that it’s correctly installed on your system.įirst, the WP-CLI homepage offers instructions for how to install the program. Sure, it’s possible to set aside a test database, test content, and then defined mock objects based on interfaces (and I’m not here to dissuade anyone from doing that). As I mentioned in yesterday’s post, one of the things that we’re doing with is making sure that all of our work is unit tested from the initial version.Īnd when it comes to unit testing in PHP, many of us are familiar with PHPUnit however, when it comes to unit testing plugins that are integrated with WordPress, it helps to have a test environment set up.
