• T
  • T

Develop WordPress Locally In 4 Simple Steps

Until recently, I was amidst the multitude of people who would rather develop WordPress Themes live rather than locally. Simply because posting to a server is what I know to do and it is easy! What isn’t easy is relying on your server to process your PHP every time you need to refresh your browser to see your changes. Never-mind the act of publishing your code a thousand times!

I gave MAMP a try awhile ago and it just didn’t feel right and what I found to set it up was confusing and involved other programs. Too much of a headache. But I gave it another try and I found how to set it up in just a few easy steps (easier than installing on a remote server by the way). Let’s take a look…

Disclaimer: This is written for WordPress developers who know how to install WordPress on a server. I am skipping those steps. View this page to see how to do that.

Step 1:
Download MAMP (the free version is all you need for this) from their website at: mamp.info.

Step 2:
Launch MAMP and in “Preferences > Apache”, select the root of your WordPress installation on your local drive.

Step 3:
Visit localhost:8888/MAMP/ in your browser and click on “phpMyAdmin”, and in the “Create new database” field, give your database a name and click “Create”. *This database is just for development so don’t worry about it too much. Any content will have to be exported out of it anyways for deployment.

Step 4:
In your WordPress installation, find your “wp-config-sample.php” file and rename it to “wp-config.php”. Within that file modify the “DB_NAME” to match the name you gave your database in the last step. And for both the “DB_USER” and the “DB_PASSWORD”, write in ‘root’. *Those were automatically generated by MAMP.

Step 5:
Relax! That is it! All you have to do is plug in localhost:8888 to your browser and you will be prompted with the standard setup screens that you see after a “live” WordPress installation. Again, if you need a refresher on any of those processes visit any one of the myriad of tutorials on a complete WordPress installation.

Please let me know your thoughts, questions or anything else in the comments. Happy coding…