Prepare Mac OS X for WordPress

If you want to install WordPress on your own computer running Mac OS X you need to turn on Personal Web Sharing via the Sharing System Preference, install MySQL and turn on PHP.
Fortunately there are comprehensive instructions at MacZealots.com. Unfortunately, the instructions were written in May 2005 for WordPress 1.5, and are slightly dated. There’s also a small area of uncertainty around editing the file called httpd.conf. This entry provides some useful extra tips.
Check WordPress requirements
First you need to check the WordPress requirements page to determine which versions of MySQL and PHP are required.
Install and configure MySQL
I installed MySQL v5.0.22 on my PowerPC Mac mini running Mac OS X 10.4.7. I made sure to move the MySQL.prefPane included with the installer into the /Library/PreferencePanes folder. This Preference Pane makes it easy to start and stop the MySQL server from System Preferences.
Following along with the tutorial I ran into trouble with the first MySQL instruction, as all it seemed to do was stop the MySQL server, and then I couldn’t get it restarted:
<code>cd /usr/local/mysql<br /> sudo chown -R mysql data/<br /> sudo echo<br /> sudo ./bin/mysqld_safe &#38;</code>
I suspect it would be better to skip that step. I restarted the Mac (which restarted the MySQL server, thanks to the Preference Pane) and picked up with the tutorial, beginning with this instruction:
<code>/usr/local/mysql/bin/mysql test</code>
Check the databases
All now seemed to be working as it should, but just to confirm, I downloaded CocoaMySQL-SBG 0.7.1, started it up, connected to Localhost with root as the username and the password I had entered in one of the previous steps. It did indeed show that amongst other databases, test and wordpress were both present.
Enable PHP
I could see PHP wasn’t enabled on the Mac mini because when I loaded my local WordPress directory into my browser the page simply displayed the PHP code for the top level index.php.
The next step is to edit the hidden file /etc/httpd/httpd.conf. Not comfortable using command line tools mentioned in the tutorial, I downloaded TextWrangler and used the command File > Open Hidden… to open the file. I made sure to Enable All Files, rather than All Readable Files, so that I could see and select the correct file.
After following the instructions in the MacZealots tutorial for enabling PHP and with the differences mentioned above, I was finally in a position to go ahead with setting up a config.php file and installing WordPress in the usual way.
[…] Installation: http://maczealots.com/tutorials/wordpress/ http://www.wpvqs.com/?p=51 […]
Pingback by GLORIAD System Advancements » Blog Archive » WordPress Links — January 10, 2007 @ 6:07 pm
[…] Installation: http://maczealots.com/tutorials/wordpress/ http://www.wpvqs.com/?p=51 […]
Pingback by Security at GLORIAD » Blog Archive » WordPress Links — June 22, 2007 @ 8:10 pm