MOin on Jul 15, 2010 | Tips & Tutorials

How to Install WordPress Locally on Mac OS X 10.5 Leopard

Delicious

Most Mac developers and designers who use WordPress install a local version of it the first thing after they do an OS installation. With Mac OS X 10.5 Leopard, people have encountered a number of difficulties while trying to install WordPress locally.

wplocal powerbook How to Install WordPress Locally on Mac OS X 10.5 Leopard

Here are the steps you can take to install a local copy of WordPress.

Step 1: Download the Mac version of MySQL from here.

Step 2: Now install the MySQL package. The preference pane can be installed by dragging MySQL.prefPane to /Library/PreferencePanes however it is not very helpful as there is a bug that prevents MySQL from being started with this.

Step 3: Manually start MySQL by typing this in one terminal window:

sudo /usr/LOCAL/mysql/bin/safe_mysqld

Step 4: Close the terminal window and open another one. Type in the following and restart MySQL each time by rebooting the system:

sudo mkdir /var/mysql/
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Step 5: You will need to substitute your chosen MySQL root password for {ROOTPASS} and the Bonjour computer name (shown at the top of Sharing in System Preferences) for {HOST}.

$ mysql -u root
> DROP DATABASE test;
> DELETE FROM mysql.USER WHERE USER = '';
> FLUSH privileges;
> SET password FOR root@localhost = password('{ROOTPASS}');
> SET password FOR root@127.0.0.1 = password('{ROOTPASS}');
> SET password FOR 'root'@'{HOST}.local' = password('{ROOTPASS}');
> quit

Step 6: Now comes creating the WordPress MySQL database and user. {ROOTPASS} will be the same. In the following example, a database named wordpress is created and a username wpuser is granted privileges.

$ mysql -u root -p
Enter Password: {ROOTPASS}
> CREATE DATABASE wordpress;
> GRANT ALL privileges ON wordpress.* TO wpuser@localhost IDENTIFIED BY 'foo';
> SET password FOR wpuser@localhost = old_password('wppass');
> quit

Step 7: Turning on PHP is fairly easy. Open the file /etc/apache2/httpd.conf.

Step 8: Remove the “#” from the following line # LoadModule php5_module and save the file.

Step 9: Finally you can install WordPress. Download and extract WordPress from here.

Step 10: Copy the extracted contents to your Sites folder under your user name.

Step 11: In the Sites folder, open wp-config-sample.php and save it as wp-config.php

Step 12: Change the following first lines of the document to point to your database.

define('DB_NAME', 'wordpress'); // The name OF the DATABASE
define('DB_USER', 'wpuser'); // Your MySQL username
define('DB_PASSWORD', 'wppass'); //AND password
define('DB_HOST', 'localhost:/tmp/mysql.sock'); // 99% chance...

Step 13: Restart apache by typing this in the terminal:

sudo apachectl restart

Step 14: Commence installation by using your browser to navigate to your installation folder. Replace “user” with your username:

http://localhost/~USER/wp-admin/install.php

Step 15: People facing problems might have to update their virtual hosts with the following command: Again, replace “user” with your username:

sudo cp /etc/httpd/users/USER.conf /etc/apache2/users/USER.conf

Step 16: Restart apache once again with:

sudo apachectl restart
Stumble it Digg it Vote on Reddit Add to delicious
Tweet it Share on facebook Add to Technorati Float it

One Response to “How to Install WordPress Locally on Mac OS X 10.5 Leopard”

  1. [...] This post was mentioned on Twitter by Thumb Press, Shouter and DeafBeat, WP Skinner. WP Skinner said: How to Install WordPress Locally on Mac OS X 10.5 Leopard – http://bit.ly/cFwnAm #wordpress #wp [...]

Leave a Reply


You can submit your free wordpress theme in WP skinner user submitted themes gallery to get Downloads and popularity. Its Free! ​ ​ Submit your Theme

View All >>

About | Contact | Submit your Theme
© 2012 WP Skinner | Powered by WordPress Top ^