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