There are many variations of tutorials available on how to install wordpress on your Mac. Good proof that there are many ways to install Wordpress locally. We do it differently at BuzzDroid.com so we might as well jump in the fire with our offering.
Why would you want to do this? When you install Wordpress on your Mac, you can use it as a testing ground for themes, plugins or other ideas you want to test before making the modifications on your production blog.
Steps in this tutorial:
- Turn Your Mac Into A Local Webserver
- Create A Mysql Database On Your Mac
- Install Wordpress On Your Mac
Before we go any further, under Safari > Preferences > General, make sure the “Open” safe files option is NOT checked. Installing Wordpress on your Mac requires you to download to files that must remain in their .tar.gz format for easier install.
Turn Your Mac Into A Local Webserver
To serve Wordpress to yourself, you first need to make your Mac a mini-webserver of sorts. In the Linux world, the term is LAMP (Linux, Apache, Mysql, PHP). These four items drive most websites and can be quite complicated to setup and configure.
XAMPP is the easiest way to set up a LAMP server on any system that will be used in a test environment. Download XAMPP and drag the .tar.gz file to your home folder. Open a terminal using Applications > Utilities > Terminal. In the terminal window type:
sudo su
tar xfvz xampp-macosx-0.6a.tar.gz -C /
You’re done. Sorry it wasn’t more complicated but that’s why XAMPP is so great.
Start XAMPP with:
/Applications/xampp/xamppfiles/mampp start
XAMPP is now started and you can see your local webserver in a browser at http://localhost.
Best practice at this point is to run one more call to shore up the security of XAMPP, in terminal:
/Applications/xampp/xamppfiles/mampp security
This call allows you to add a password for various components of the XAMPP setup.
Create A Mysql Database On Your Mac
Go to http://localhost/phpmyadmin and create your Wordpress database. Get creative and call it “Wordpress”. If you get an error when you access your phpmyadmin page, you may need to edit your config.inc.php file and the Mysql password you entered when securing your XAMPP install in the previous step. Don’t panic. Open a terminal and type:
sudo su
cd /Applications/xampp/xamppfiles/phpmyadmin
nano config.inc.php
Find the line that reads
$cfg['Servers'][$i]['password'] = '';
and add the Mysql password. Save the file with ‘ctrl X’ and type ‘Y’ to confirm the save. http://localhost/phpmyadmin now has the Mysql password and you can create your new database for Wordpress.
Install Wordpress On Your Mac
Download Wordpress and save it to your desktop. Open a Finder window and choose Applications > xampp > htdocs. This is your webserver root directory. Drag your downloaded Wordpress file to your htdocs folder and click the file to uncompress the archive in the htdocs folder.
In your Wordpress folder, open the config.sample.php file and find the line that reads:
define('DB_PASSWORD', ''); // ...and password
and add your Mysql password to make it look this:
define('DB_PASSWORD', ''my_cool_password"); // ...and password
Save the changes to the file as ‘config.php’, dropping the ’sample’ from the file name.
Again, sorry it’s not harder but your done. Visit your local Wordpress installation at http://localhost/wordpress and complete the famous “five minute install” that takes only seconds.
You have now succesfully installed Wordpress on your Mac using XAMPP. You can test themes, plugins or whatever else your little blogging heart desires on your local install of Wordpress before uploading it to your production site.









BuzzDroid.com » 10 Things To Do With Your MacBook Pro When The Electricity Goes Out wrote,
[…] Work on your blog theme offline (if you’ve installed Wordpress on your Mac. […]
Quote | Link | March 4th, 2007 at 6:32 am
mssmotorrd wrote,
It’s the first time I commented here and I must say you share us genuine, and quality information for bloggers! Good job.
p.s. You have a very good template for your blog. Where did you find it?
Quote | Link | May 3rd, 2009 at 4:52 am
Matt Rogers wrote,
This was exactly what I was looking for. When you setup a LAMP server should it be an independent mac with no other function besides being a MYSQL server?
Quote | Link | October 20th, 2009 at 11:09 am
deryck wrote,
did everything you said. didn’t work. please help.
(macbook pro osx10.6.2)
d
Quote | Link | January 2nd, 2010 at 2:56 pm
Catherine Scholz wrote,
would you pls add instructions for when you are ready to go live?
Quote | Link | February 18th, 2011 at 11:27 am
casey wrote,
Thanks for the post. I also found this link which helps for users not comfortable with the terminal.
http://codepuzzle.net/?p=11
thanks for the info
Quote | Link | April 3rd, 2011 at 7:39 am
Lindsay wrote,
Hello I need help installing the wordpress to a mac os x 10.4.11
I followed your instructions and downloaded xammp
I got to the point where
i went into: http://localhost/wordpress/
and it said error
“There doesn’t seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn’t work for all server setups. The safest way is to manually create the file.
“
I am now trying to create a configuration file… I just dont know the following
“Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.
Database name
Database username
Database password
Database host
Table prefix (if you want to run more than one WordPress in a single database)
If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php.
In all likelihood, these items were supplied to you by your Web Host. If you do not have this information, then you will need to contact them before you can continue. If you’re all ready…”
where do i go from here to find out the database name, password etc.
Thanks
Ps. ive never done something like this before
Quote | Link | April 6th, 2011 at 11:02 am
Catherine Scholz wrote,
How do I unsubscribe my email from your comments?
Quote | Link | April 6th, 2011 at 1:06 pm
Maarten wrote,
Hello Tommy,
Thnx for your tutorial. While following it’s intruction, everything went well, untill this appeared:
Error
MySQL said: Documentation
#1045 - Access denied for user ‘root’@'localhost’ (using password: NO)
I tried several things, but i can’t find out, what i have to do.
Quote | Link | May 19th, 2011 at 6:43 am
mtambio wrote,
I am in the same step as Lindsay (see comments above)
I did everything till i got to the http://localhost/wordpress/
then it says it cannot access server …..it is saying can’t connect to server…..
I do have internet access …however my wordpress website is not running on another server other than the free wordpress server ……
i just need to install new themes to change my website look…..pls help….
cheers
m
Quote | Link | May 15th, 2012 at 11:47 pm
Islam Muslim wrote,
Thank’s for this (How To Install Wordpress On Your Mac) great tutorials. I was having a hard time with those.
Quote | Link | August 4th, 2012 at 4:09 am
PymnLitioni wrote,
How To Install Wordpress On Your Mac |
BuzzDroid.com
sac longchamp
Quote | Link | November 6th, 2012 at 9:51 am