I personally use HeidiSQL (Windows Based) for this, but you can also use the very popular phpMyAdmin if you are already used to it. If you have multiple local WordPress installs, then you need a quick way to manage your MySQL databases.
Install WordPress on Ubuntu 20.04 and Speed Up Your Sites –.Installing WordPress On Windows Locally With WAMP –.Install WordPress Locally on Windows with Xampp –.Installing WordPress On Mac Locally With MAMP –.
How to Install WordPress Locally on Mac using MAMP –.Also check out these great tutorials to help you along: Read Installing WordPress from the codex, or if you have a Windows PC like me, simply install WordPress using the Web Platform Installer. If you already have this mastered, then move on. Please note: there are many ways to configure and install WordPress locally on your PC or Mac. And you need to do this locally so that you can debug and test with speed. Installing WordPress locally seems like the logical first step, and besides, you need a way to test the plugin you are going to write. Remember, we are here to learn and also have fun! 1. The last thing I want is for you to get stuck, or even worse, scare you away. Alternatively, if you are a web designer and are only interested in getting started with WordPress plugins, then leave off the optional steps. If you are a hardcore PHP developer already, and you want to take WordPress plugin development seriously, then complete all the steps. That is cool, and also the reason why I have made some things optional. Here is the list of what we will be covering:Įarly on, Adam and Matt pointed out that the majority of readers will likely be at a beginner level, and that some of these steps may be too difficult. I believe that without the fundamentals, you might as well not even start. Think of this post as an upfront investment – a down payment if you will. Getting my development environment setup correctly from the start has literally saved me weeks worth of time over the last couple of years. Solution no.FooCamp – How to Make a WordPress Plugin – Your EnvironmentĪs mentioned in the introduction post, before you write a single line of code to make a WordPress plugin, you need to prepare both your environment and yourself, to start writing code.Ī lot of tutorials just jump in and miss the fundamentals.
It will – as Tom Haigh mentioned – add the MAMP PHP executable to the path so you can use “php” instead of the full path. Run this in your Terminal: export PATH=/Applications/MAMP/bin/php5/bin/:$PATH
Remember to update this path if you update MAMP with a more recent version of PHP. The next time you try to call php from the cli, you’ll be using the 5.4.10 version installed with MAMP. Save and quit (CTRL+X in nano, :wq in vi). bash_profile file in your editor of choice (nano, vi, etc.): # nano ~/.bash_profileĪdd this below your PATH statement: alias php=/Applications/MAMP/bin/php/php5.4.10/bin/php This has the benefit of avoiding some potential library and php.ini config compatibility issues with the installed version of php in OSX.įor instance, if you want to point to php 5.4.1 in MAMP, edit your. Or like this (depending on which version of PHP you want to use): export PATH=/Applications/MAMP/bin/php/php5.3.6/bin/:$PATHĪnother way that works that may be a little cleaner with regard to PHP versions is to create an alias in your bash profile that points to the specific php binary that you want to run when you run things like composer or other cli tools. Therefore the command to add MAMP’s php command should probably look like this: export PATH=/Applications/MAMP/bin/php/php5.2.17/bin/:$PATH It is now one of the following: /Applications/MAMP/bin/php/php5.2.17/bin/ Please note that with version 2.0.5 of MAMP, the path has changed. Now you can use it from the command line: $ phpmamp -help Update: I agree with jjeaton below, here is a nice solution of creating an alias to MAMP’s PHP: # add this to your ~/.bash_profileĪlias phpmamp='/Applications/MAMP/bin/php/php5.3.6/bin/php' How should I set up my environment so that I can run a script from the command line and use the PHP version I installed with MAMP? Now I am trying to run a script from the command line, but I can’t seem to get it to work.