Installing WordPress on Tiger
Easy as 1, 2, 3
26 May 2005 Matt Willmore Skip to comments
187 Comments
(
Closed)
Matt Willmore teaches you the basics of getting the open source blogging engine WordPress installed on your Mac running OS X 10.4 Tiger.
Of the many options out there, many people choose to run their own blogging software as opposed to a managed service like Blogger or TypePad. On the software side, there are many decent tools available, such as Six Apart's Movable Type (we have a tutorial for installing MT as well). WordPress is another mature, capable and free blogging engine that is very popular with many bloggers (like its founding developer, Matt Mullenweg) and rapidly gaining in popularity across the Web. WordPress is an excellent choice for a personal or professional blog, and the price is right, too. This tutorial will show you how to install WordPress 1.5.1.3 on OS X 10.4 Tiger.
Note: The most recent version of WordPress is 1.5.1.3, which contains a security patch among other improvements. This tutorial is fully compatible with the most recent version of WordPress. Version 1.5.1.3 is recommended for all WordPress users (upgrade instructions).
If you have installed another blog engine such as WordPress or Movable Type already, you may already have MySQL and/or PHP configured. If this is the case, you can skip right down to step 4.
Before we get started, let's summarize what we'll be going over in the installation:
- Downloading and Installing WordPress 1.5.1.3
- Enabling Personal Web Sharing
- Downloading and Installing MySQL
- Configuring MySQL
- Enabling and Testing PHP
- Configuring WordPress
- ???
- Profit!
Downloading and Installing WordPress 1.5.1.3
If we're going to blog our way to stardom, we'll need some blogging software, right? The first step we'll take will be to download the latest stable version of WordPress, version 1.5.1.3. The compressed file should be about 250KB, and OS X will decompress it for you.
Once it's decompressed, we'll move the wordpress directory to OS X's Web hosting directory in /Library/WebServer/Documents. By default, all requests for the domain's root directory (like http://maczealots.com/) will go to this directory. This can be changed in Apache's httpd.conf file, which we'll cover later. If you like, you can also change the name of the wordpress directory to something else, like blog. This way the URL of the blog would change to http://www.yoursite.com/blog/ Additionally, if you want the blog itself to be at the root directory, delete all the items from the /Library/WebServer/Documents directory and move the contents of the wordpress directory to the now-empty Documents folder.
Enabling Personal Web Sharing
"Personal Web Sharing" (PWS) is Apple's marketing name for Apache, the industrial-strength, tried-and-true Web server du jour. When you enable PWS, OS X starts up Apache, registers the modules, opens ports, etc. Since we'll be serving the blog, we'll need to have Apache running.
To enable Personal Web Sharing, open the Sharing preference pane in System Preferences. Check the box labeled "Personal Web Sharing", and that's it. (You may have to authenticate as an administrator before it will let you enable anything.) Go ahead and close System Preferences; you're ready to install MySQL now.
Note: We are working on a version of this tutorial that includes the ability to host the database with SQLite, which is prepackaged in OS X 10.4. However, support for SQLite in WordPress is still being fully developed, so for now MySQL is still the way to go. If you'd like to see such an article, let us know.
Downloading and Installing MySQL
MySQL is the database backend that WordPress (and other blogging packages like Movable Type) can use to store blog entries, users, comments, etc. MySQL is free for personal use. First, download MySQL (4.0.24 at the time of publication). It will come as disk image with two packages and a readme. We will be installing both packages. First, open the main MySQL installer. It will install all the necessary components to run MySQL onto your OS X volume. After that installer has completed, run the startup item installer, which will automatically start up MySQL after any computer restarts.
Note: One of the most common problems reported is that people install MySQL 4.1 instead of 4.0. I can understand the desire to be on the bleeding edge of software, but WordPress (and most other blog/CMS engines) use an older authentication scheme that is incompatible with MySQL 4.1 and greater. There are hacks and workarounds out there, but for the easiest installation, stick to MySQL 4.0.
Configuring MySQL
Now that you have installed MySQL, let's configure it so WordPress can access it. Open a new terminal session (found in /Applications/Utilities/Terminal.app) and type the following commands to navigate, make some changes, and start the MySQL daemon:
cd /usr/local/mysql
sudo chown -R mysql data/
sudo echo
sudo ./bin/mysqld_safe &
Next, let's launch MySQL and use the test database (called test, even) to make sure everything's running correctly:
/usr/local/mysql/bin/mysql test
If everything's running correctly, you should see output similar to this:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version 4.0.24-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Once you've verified that MySQL is running correctly, use the command quit to return to the console prompt.
Now that MySQL is running, we'll change the root password of MySQL so that WordPress (and you) can access it later. Use this command (where yourpasswordhere is replaced by your chosen password):
/usr/local/mysql/bin/mysqladmin -u root password yourpasswordhere
The last thing we'll have to do in MySQL is to create a table for WordPress to store its data. We'll call it wordpress to keep things simple. To accomplish this, we'll enter MySQL, create the table, and allow WordPress to edit it.
/usr/local/mysql/bin/mysql -u root -p
CREATE DATABASE wordpress;
quit
Enabling and Testing PHP
Now that MySQL is ready to go, let's fire up PHP. OS X ships with PHP installed, but not activated. Fortunately, this is really easy to do. The only file we'll need to edit is httpd.conf, which Apache uses for its configuration.
Open the config file in your favorite editor (I'll be using pico):
sudo pico /etc/httpd/httpd.conf
Mosey on down to the Dynamic Shared Object (DSO) Support section. It's the one with all the LoadModule listings. The one for PHP 4 is towards the bottom of that list. Look for the line and uncomment it to activate it. You can uncomment a line by removing the pound symbol ("#") from the beginning of the line. The new line should look as such:
LoadModule php4_module
We'll also need to uncomment the PHP 4 entry in the AddModule listings, so that it looks as such:
AddModule mod_php4.c
Once those two lines are edited you can save the httpd.conf file and quit the editor. Since we've edited Apache's load setup, we need to restart Apache so it will recognize the changes:
sudo apachectl graceful
With that out of the way, let's make sure that PHP is indeed running. Create a new text file in your favorite editor (stay away from RTF-happy TextEdit, though - SubEthaEdit gets my vote) and fill it with the following text:
<?php
phpinfo();
?>
Save the file as test.php in the root directory (/Library/WebServer/Documents/) and load the address of the page (usually http://localhost/test.php) into a Web browser. If PHP was correctly enabled, the phpinfo(); command should output page after page about the PHP installation. If not, retrace your steps - it can be easy to make a mistake.
Configuring WordPress
Now for the last step: configuring WordPress. First, you'll need to edit WordPress' default configuration file wp-config-sample.php. You'll find it in the root folder of the WordPress installation. This is where you'll set up the database information. Edit the following settings:
define('DB_NAME', 'wordpress'); - Change 'wordpress' to the name of the database you created in MySQL (in the example we named it wordpress).
define('DB_USER', 'username'); - change 'username' to root.
define('DB_PASSWORD', 'password'); - change 'password' to the MySQL password you chose.
Once you've made the changes, save the file as wp-config.php in the same directory and delete wp-config-sample.php.
Now, open a Web browser window and start the WordPress installer, found at http://localhost/blog/wp-admin/install.php. (Remember that if you chose to install WordPress in a different directory, such as the root directory, the address will be different for you.) WordPress will take you through the install process and set up the database with all the tables it needs to run.
After it completes, it will give you the login (admin) and password to log in to WordPress. The password is randomly generated and not recoverable so please write it down!
After you log in, there are two things you need to immediately do. First, change your password to something you can remember. You can find it in the Users tab of WordPress' controls. Also, to avoid posting entries as "Administrator", you can either create another account with a posting name, or simply enter a nicknaame in the admin account. But whatever you do, change the password and remember it — once you lose it, your data is hard to get back.
Now comes the moment you've been waiting for. Click View site » in WordPress' controls or open a Web browser and go to http://localhost/blog and watch your blog appear! Roll up your sleeves, perfect the CSS, and wax poetic, serving it to the free world without spending a dime on extra software. Happy blogging!
Matt Willmore is a founding partner of MacZealots.com. Matt is also a Resident Assistant at Owen Hall and does Mac support at ECN, and is active in PUMUG. He can be reached at .



Reader Comments (187)
DISCLAIMER: The views expressed below are those of their authors and not necessarily endorsed or supported by MacZealots.com. In all cases, the comments provided here are offered as a courtesy and will be moderated. Any content deemed off-topic or offensive will be removed without notice. Posting a comment here boils down to two things: 1.) Think before you type 2.) Respect the thoughts of others. See our commenting guidelines and/or privacy policy for more information.
#1) On June 26, 2004 6:43 PM
Thanks for the how-to.
#2) On June 27, 2004 2:56 AM
Thanks, this worked perfectly. I was wanting to experiment and had run out of hosted databases to play with.
#3) On June 27, 2004 4:20 PM
Not wanting to detract from the article, but Miraz, you can always install it into an existing database as it uses a prefix on the database tables.
#4) On July 1, 2004 1:24 AM
Subtle South Park references: awesome. This article was amazing before I even read it.
#5) On July 17, 2004 2:03 PM
For those of you looking to upgrade your current PHP installation to PHP version 5.0, PHPMac.com has just published guidelines on upgrading your local installation of PHP to the newly released version 5.0 on Mac OS X v10.3 “Panther”.
#6) On July 17, 2004 4:12 PM
Are there any OS X clients available to post to WordPress?
#7) On July 17, 2004 6:04 PM
jg, Ecto works just fine with Wordpress.
http://www.kung-foo.tv/ecto/
#8) On July 28, 2004 9:58 AM
Hi!
Must say that your are cool!
I had trouble all time with the installation of mysql on my 10.3.4 system but this was super. It just works and Iam very happy. THANKS!!!!
#9) On August 8, 2004 5:31 PM
Fantastic, you make my life a whole lot easier every time I visit. Any chance of a drupal tutorial? Installation and templates?
#10) On August 30, 2004 8:44 PM
Wow, did that make my life easier, thanks! Last year I tried to load mysql, and had to discover the chown of data/ the hard way. Putting together the big picture like this is absolutely fabulous for our community. Thanks again!
#11) On September 6, 2004 1:40 AM
Um, I can’t figure out why everything works except clicking on the blog name directs to a link.local adrress (wohpe.local) rather than the URI
Any suggestions?
Otherwise, amazing. thanks!
#12) On September 11, 2004 5:24 AM
OK, I’m getting a big hangup here. I don’t belive I skipped any steps but I’m not able to load the index.php test at all.
I’ve gone through the steps a dozen times. Not like they were that complicated. To enable php you just uncomment the LoadModule setting and the AddModule setting for php.
I did that. I’m not an idiot I’ve built Linux from Scratch before. This is irritating. Any help appreciated.
#13) On September 11, 2004 5:26 AM
Christ! Nevermind. So stupid. I’ll just be in this corner of the internet cowering in shame. Damn…
#14) On October 4, 2004 1:03 AM
okay…I’ve RACKED my brain about how to get the PHP “test” above to work. I have YET to see the “page after page” of PHP info described above. I’ve retraced my steps MORE than 3 times (as recommended earlier) and can NOT figure out what I’m NOT doing.
Currently, I’ve got the WordPress directory contents DUMPED into my /webserver/documents folder…I have MySQL (apparently) up and running, PWS turned on…
Can’t figure it out. HELP!
#15) On October 4, 2004 7:54 AM
Eric -
Don’t fret, we’ll get it working for you. The PHP info page should work regardless of MySQL, so we can eliminate that as a problem. To make sure PWS is working, go to a web browser and just enter http://localhost/ as the URL. If Apache’s up and running, you should see the index.html file that Apple ships with OS X. If not, then Apache’s the problem.
If that’s the case, you can go into the terminal and reset/restart Safari with sudo apachectl graceful. If it doesn’t want to restart, it’ll tell you why.
Try that, and reply to the comments with your results. Hope this helps!
Matt
#16) On October 7, 2004 7:53 AM
I can’t configure MySQL :o(, error: “Mysql lost connection” is a bug in mysql?
#17) On October 7, 2004 5:33 PM
wow, this thing is intensely amazing, I cannot Thank the authors enough. The tutorial was superb, and articulate.
Really, this thing has stepped the ladder of ultimate kewlness.
#18) On October 7, 2004 9:07 PM
Man…I’m just all thumbs evidently. Matt, I’ve been around the block, I’m trying to start FRESH, but now I’m not getting MySQL configured. I get the following error in Terminal:
Last login: Thu Oct 7 19:59:56 on ttyp1
Welcome to Darwin!
Eric-Nentrups-PowerBook:~ ericnentrup$ cd /usr/local/mysql
Eric-Nentrups-PowerBook:/usr/local/mysql ericnentrup$ sudo chown -R mysql data/
Eric-Nentrups-PowerBook:/usr/local/mysql ericnentrup$ sudo echo
Eric-Nentrups-PowerBook:/usr/local/mysql ericnentrup$ sudo ./bin/mysqld_safe &
1 971
Eric-Nentrups-PowerBook:/usr/local/mysql ericnentrup$ Starting mysqld daemon with databases from /usr/local/mysql/data
041007 20:03:34 mysqld ended
testlocal/mysql/bin/mysql
ERROR 2002: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
1+ Done sudo ./bin/mysqld_safe
Eric-Nentrups-PowerBook:/usr/local/mysql ericnentrup$
I’ve tried to follow removal instructions and reinstallation of MySQL but I fear I’ve done something else wrong.
Thoughts about how to get a clean slate in all the directories?
#19) On October 7, 2004 10:05 PM
hallelujah, I’m in like flint. Okay. Props to Matt. And though I had to get help elsewhere to fix my initial fumblings, this tutorial does the trick!!! Now….OFF TO BLOGLAND!!!
#20) On October 7, 2004 10:13 PM
one more question…how do you CHANGE your MySQL password?
#21) On October 8, 2004 12:39 AM
things are ROCKIN’ now!! And I’ve already got a customization of Michael Heilemann’s Kubrick Theme set as my default style.
Next issue to solve….I’ve turned on “virtual webserver” in my router’s control panel. But when I try to access my blog from the outside, the images and/or the css isn’t loading. there’s a space for the header but it isn’t loading.
Thoughts?
#22) On October 17, 2004 10:20 PM
Okay, I’m going crazy here. I’ve followed this (wonderful!) tutorial twice through, and every time I get to loading http://127.0.0.1/blog/wp-admin/install.php in my browser, I get the message:
“Error establishing a database connection! This probably means that the connection information in your wp-config.php file is incorrect. Double check it and try again.
Are you sure you have the correct user/password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?”
I’ve checked and rechecked my settings.
-The Web server is up and running; I can access my regular index.html site from my browser.
-The Loadmodule and Addmodule lines have been de-commented.
-I restarted Apache.
-index.php does indeed show a complete report of the PHP setup.
-The database I am using does exist and is properly referenced in wp_config.php.
-My password is also properly entered in wp_config.php.
The only thing I can see that differs from the tutorial is that I used themost recent recommended version of the MySQL package, version 4.1.5 for Mac OSX.
Anyhelp, folks? I’m going nuts here!
Many Thanks,
Andrew
#23) On October 18, 2004 1:04 AM
Andrew -
First, I would go back to the SQL prompt where you enter the database to create the WordPress database, and make sure MySQL likes your password:
/usr/local/mysql/bin/mysql -u root -p
If that works OK, I would upgrade to MySQL 4.2.0. Even if the username and password are correct in the WordPress config, there may be a conflict in versions that is causing WordPress to ask something of the 4.1.5 MySQL install that it doesn’t understand - maybe a command that it doesn’t have, or something that wasn’t parsed as expected. It seems like everything else is working well, but try those steps and let me know if you have any progress. Thanks for reading!
#24) On October 18, 2004 12:07 PM
Hi Matt!
Yeah, my install of MySQL likes my password all right. I even used the /u command to make sure that MySQL knew which database to use, no soap. Still get the error when running install.php.
Regarding upgrading to 4.2; I can’t find a version 4.2 for OS X on the MySQL website to which you link in this article, just 4.0, 4.1 and 5.0a. Should I make the jump to the 5 alpha? I’ve heard good things about it.
Also, do I need to “uninstall” the previous version first, or will it simply overwrite the older version? (I know I have to shut down the SQL server before doing installing).
Thanks so much for your help!!
Andrew
#25) On October 18, 2004 10:13 PM
Andrew -
My mistake - 4.0.20 is the one you want. As with my last email, I would still recommend changing to 4.0.20. 4.1 is the gamma release, used for new features, none of which WordPress requires. Also, everyone who’s tried it with 4.0.20 has had success, so I stay we stick with what works for now and try it with 4.0.20. You should be able to install it right on top of the 4.1 install. Let me know how it works!
#26) On October 20, 2004 3:55 PM
Hey Folks,
After a couple of hiccups and some great help from Matt, I got my MySQL and PHP configured. Then I made the mistake of adding Snort to my server (OS X Panther, non-server version), which seemed to hose any access to my MySQL database. Once I disabled NIDS and removed the Snort front end (a really nice package called HenWen), my MySQL root password would no longer work, and I had to flush it out and reset the password.
I can see how Snort might prevent proper access to MySQL, but I have my doubts that it could affect my root password for it. I’m beginning to think that the installation of Snort and my password problems were coincidental.
Anyone have any suggestions as to where to start with tracing the problem?
TIA,
Andrew
#27) On October 30, 2004 7:08 AM
Hi,
It is possible to use MySQL 4.1.7 but they have changed the Password Hashing in MySQL 4.1
Wordpress doesn’t know about this but fortunately you can set the password in an other way so you can still use Wordpress.
Do the following:
mysql> SET PASSWORD FOR
-> ‘root’@’localhost’ = OLD_PASSWORD(‘password’);
For more info see here: http://dev.mysql.com/doc/mysql/en/Old_client.html
#28) On November 6, 2004 12:57 PM
Hey everyone. First off Matt, great article. I’ve been playing around with MarsEdit w/ WordPress a bit but can’t seem to figure out how to upload images. I believe it has to do more with WordPress than the later. The Upload option in Wordpress states
It doesn’t look like you can use the file upload feature at this time because the directory you have specified (/Library/WebServer/Documents/blog/wp-content/) doesn’t appear to be writable by WordPress. Check the permissions on the directory and for typos.
Anyone know how to do this easily?
#29) On November 7, 2004 11:38 PM
ok,
so i got this all to work on localhost and veiw it on my computer using apache. but how do you move this to your website. I mean I know how to FTP all of the pages, but what about this database that I jsut created. How do you get your wordpress database on the server.
thanks
#30) On November 25, 2004 10:16 PM
Sweet! It really does work, to any of you that read webpages in reverse, maybe I can save you an hour. Matt’s post about mysql 4.0.20 was a godsend, I struggled with 4.1.0 and 4.1.7 and same head against same wall everytime. But 4.0.20 worked the first time (only took bout 10 minutes with the right info). Awesome awesome awesome, thanks Matt for answering, and thanks Uncle for questioning.
#31) On May 7, 2005 1:49 AM
any chance of updating this for Tiger and the latest versions of WordPress?
#32) On May 8, 2005 11:11 AM
Carl, updated versions of the WordPress, Textpattern and Drupal are on their way very shortly. Thanks!
#33) On May 8, 2005 5:04 PM
I used this tutorial with Tiger and it worked flawlessly. I suggest getting the latest version of MySQL and then doing what Patrick suggested to make it work. Wordpress has yet to be updated to function w/ the authentication of the latest MySQL.
#34) On May 9, 2005 7:53 PM
On a fresh install using Tiger, Wordpress 1.5.1 and MySQL 4.1.11, I get stuck following the instructions when I try to hit http://127.0.0.1/wordpress/wp-admin/install.php
That gives me the following error:
Fatal error: Call to undefined function: get_bloginfo() in /Library/WebServer/Documents/wordpress/wp-includes/wp-db.php on line 304
Any help would be appreciated!
#35) On May 10, 2005 3:17 PM
A tip of the hat to Matt for helping me along with this - downgrading to MySQL 4.0.24 did the trick.
#36) On May 10, 2005 9:59 PM
Is there any other way to fix the get_bloginfo error without downgrading to MySQL 4.0.24? I’m doing a website for a friend, and I don’t have shell access. I uploaded everything, but I’m getting the same error when I try to run the install. Please help! Matt? :)
#37) On May 17, 2005 5:58 AM
I previously downloaded and and installed xampp for OS X which includes the latest PHP, mysql, Apache, etc. But now that I’ve loaded it I have no idea how to adapt the above instructions to configure it for wordpress and I’m loath to spend another eon trying to download the 24mb mysql stand-alone to follow the above instructions. Any tips? Thanks
Barak
#38) On May 24, 2005 4:56 PM
I’m running MySQL 4.1.12 on Mac OS 10.4.2 with PHP 4.
I ran through this tutorial and was fine up until I tried to load /wp-admin/install.php in Safari. I repeatedly, and frustratingly, ran into the “Cannot connect to database problem” and used Patrick’s idea of going here:
http://dev.mysql.com/doc/mysql/en/Old_client.html
I used the Old_Password command to switch my password - I’d tried it before, but my problem was that I had uppercase letters and numbers in the password. When I tried it with an all-lowercase password, it worked fine. Now I’m up and running, hallelujah! Hope this helps someone else.
Thanks to all and thank you for a lovely article.
#39) On May 27, 2005 4:54 AM
Hi Matt, thanks for the updated tutorial. Saved me from getting a bald head with this new client that needed to use WP.
Anyway, you might also want to touch on using mod\_rewrite which I found wasn’t setup properly by default in Tiger. I had to refer to http://www.four54.com/deheus/petrik/blog/post/33/ to enable mod\_rewrite to work.
#40) On May 28, 2005 9:21 AM
great tutorials on this site… but they are all for users of Mac OSX Client…. any chance i can find the same tutorials, but for Mac OSX SERVER? (yes, there are significant differences). if the zealots don’t consider server tutorials a worthy subject, can anybody point me to similar CMS tutorials, but for OSXserver? thanks!
#41) On May 30, 2005 9:25 PM
What a great tutorial for a great application. I installed it in less than 5 minutes (minus the downloading time for MySQL and Wordpress). One question though. On my current Wordpress installation (on my webhost) I use the plugin “Wordpress Backup” and I did a backup of my installation. I reinstalled the same plugin on my local Wordpress installation and placed the sql file in the backup folder and when I did a restore…it didn’t do anything. The database name is still the same (wordpress) and everything.
Any help? If not, I just wanted to say Thank You for the great tutorial.
#42) On June 3, 2005 10:48 AM
Thanks for the great tutorial. I got through the install with these instructions, but I am having a really hard time getting permalinks to work correctly on my WP install. I get 404 errors when clicking on just about anything (Comments, Archives, Categories) from my main page. Other that that, most things seem to be functioning fine. PHP5 & MySQL4 load fine, .htaccess is writable, DB Creation was successful, its just the permalinks that do not work. When I turn them off, everything is fine. I think it is most likely a problem in my httpd.conf file or the mod_rewrite functionality, but I cannot figure it out.
Anyone have any experience getting Wordpress permalinks to work on OSX server 10.3.9?. Any help would be greatly appreciated.
#43) On June 6, 2005 1:01 PM
I understand installing a local copy of Wordpress is useful for testing, but what differences are there if you are hosting your real WordPress on someone else’s server? I have 2 sites 1 UNIX and 1 Linux.
Do I need to install multiple databases? what naming conventions should I use? Is enabling “Personal Websharing” necessary if I’m not serving the blog from my own Mac?
#44) On June 6, 2005 1:03 PM
Sorry about the double post. To clarify: the questions were about the local copy of WordPress on my Mac, not on the remote host.
#45) On June 6, 2005 5:37 PM
Marline -
Along with testing, many people actually run their sites from their personal computer. Also, since the non-server version of OS X can still act as a server, many people use that instead of shelling out the money for OS X Server. WordPress will definitely work on Unix and Linux. These are just OS X-specific instructions; every OS has its unique steps.
As for the question about databases, you will need to only need to install MySQL once on the machine, but each installation of WordPress will need its own database. If for some reason you can only have a single database (some ISP’s restrict customers to one) you can use prefixes to distinguish multiple “virtual” databases within the same physical database. (I know how vague that is; let me know if this is the case and I can explain this more.)
If you’re not hosting any web sites locally (on your Mac), Personal Web Sharing is not necessary.
#46) On June 9, 2005 9:28 PM
Jonathan -
I personally don’t have experience with .htaccess - I was excited enough to see the blog work. :) However, there is a post on WordPress’ support site that mentions the need to edit username.conf as well. Let me know if this helps any; if not, I’ll jump in with you and we’ll get this figured out.
#47) On June 11, 2005 9:49 PM
Great how-to. Thanks for the work.
#48) On June 13, 2005 6:24 PM
I’m having difficulty “Configuring MySQL” . I’m really sure how the commads are to be entered in the terminal. Enter following each line of code. When I do that, I’m ask for a password after the line “sudo chown -R mysql data/” ???? I really a novice. Please help.
Don
#49) On June 18, 2005 10:26 AM
OK, I have my site up and running on my computer. My only problem is that some of the page is not loading. My computer in behind a Linksys Router. I have ports 80, 3306, and 21 forwarded to my machine. My CSS is not loading. Is there a port for CSS?
#50) On June 18, 2005 2:04 PM
question answered. thanks Matt!!!
Matt’s suggestion to Brad:
Most likely, you have localhost specified as the URL in your WordPress configuration instead of a relative address (like ../index.php). Using localhost will work fine on your machine, but for anyone (including yourself) outside the machine, the code will look for the CSS on THEIR localhost. Change that and you should be good to go.
#51) On June 19, 2005 9:50 PM
Brad, CSS does not have a port, it is simply a modification to html, make sure that your html pages have the proper external stylesheet chosen. To do so put this in the head section of the document: Also, I myself was having a problem with getting MySQL to work, when I tried typing in mysql in the terminal this is the message i get: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
I’ve searched for it in Google, done what the tutorials have told me and I still can not figure out how to get this to work, someone please help me.
#52) On June 19, 2005 9:52 PM
woops, brad what I told you to put in the document didn’t show up because it was formated w/ html tags, just go here: http://www.w3.org/TR/REC-CSS1#containment-in-html
#53) On June 20, 2005 10:24 AM
Don -
The password at that step is your OS X administrator password, which you created with the first account on the machine. You may have other administrators on your machine, which you can check in the Accounts preference pane of System Preferences, but the first account created is by default an administrator.
#54) On June 20, 2005 10:31 AM
snipehack -
That error occurs because MySQL is not running. I would go back to step 4 (Configuring MySQL) and run those steps again.
#55) On June 20, 2005 12:34 PM
Minor nitpick, but it says
> WordPress is another maature, capable and free blogging engine
^^^^^^^
Thanks for an otherwise great article :)
#56) On June 20, 2005 12:35 PM
Oops, the carots in my previous remark should have been pointing out the ‘maature’ word.
#57) On June 20, 2005 12:47 PM
Swaroop -
Thanks for the note; fixed!
#58) On June 21, 2005 2:31 PM
Hello,
I reinstalled OS X Server 10.4.1 fresh, updated it, started the web server, enabled PHP, installed MySql from the Mac GUI tool that comes with OS X Server, created the database, created the users, and I still have the same Error establishing a database connection problem. :(
See: http://wordpress.org/support/topic/34738
#59) On June 21, 2005 2:50 PM
Went without a hitch. Thanks.
I am running WP as an internal blog. If my internal IP were to change, is this a big deal to my install (besides the blog URL changing)?
#60) On June 23, 2005 9:29 PM
Is there any reason that this won’t work on Panther?
#61) On June 23, 2005 9:43 PM
Hey Matt, I’m having REAL problems. I’m trying to set=up WP on my mac. I have steps 1, 2 and 5 down. I get the PHP page by page deal no problem. What I don’t get is WP install.
I followed everything carefully but when I typed in http://localhost/blog/wp-admin/install.php. —> nothing. I do get A WP screen when I type in http://localhost/wordpress/wp-admin. That tells me that it “CAN”T SELECT DATABASE—(which means your username and password is okay) but not able to select the wordpress database.”
The only area I had/have problems is in Configuring MySQL. I get through your instructions there fine until “Now that MySQL is running, we’ll change the root password of MySQL so that WordPress (and you) can access it later. Use this command (where yourpasswordhere is replaced by your chosen password): When I follow the next piece of code and add the password in the appropriate spot I get an error message which says this “/usr/local/mysql/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user: ‘root@localhost’ (Using password: NO)’
Help, what’s going on!?!
Stuart
#62) On June 28, 2005 5:54 AM
Just a minor correction, the WordPress version mentioned is 1.5.1.1, not 1.5.11. The latest is 1.5.1.2.
These were very minor fix releases, save for the major RSS bug fixed in 1.5.1.1.
#63) On June 30, 2005 9:57 PM
Hi guys,
I’m somewhat new to the blogging community- specifically designing blogs for content management websites. I’m moving toward CMS though, since they’re easy to update. My question is after looking at WP websites and so on, I haven’t found anything that speaks about taking an html site from scratch and tweaking it for WP. If anyone can lead me to a good tutorial, that would be great. Thanks.
#64) On July 5, 2005 3:12 PM
Check out these themes for the backend to make it look more like Mac OS X:
http://www.jgraphics.net/wordpress/spotpress/
http://www.orderedlist.com/articles/wordpress-administration-design-tiger/
#65) On July 6, 2005 11:54 AM
Well written article, it’s really useful (and still rare) for someone to take the trouble to spell out the individual steps clearly and not leave out some important (but vital) tiny step that power users take for granted but us ordinary folk don’t notice.
One problem I’m having - I’ve installed a test blog and it’s fine on the local machine BUT other Macs on the network only get as far as the front page, don’t even see the .css file. It seems that all the links in the code are absolute (in this case ‘localhost’) not relative (ie would be philsmachine.local on the local net). So the browsers don’t get to load anything after the front page I type in as ‘philsmachine.local/blog’. Where’d I go wrong?
#66) On July 11, 2005 4:47 PM
MJ -
My first guess would be to follow the Apple support document that highlights an issue with MySQL and PHP on OS X Server.
http://docs.info.apple.com/article.html?artnum=301457
Past that, make sure the user is ‘root’ in wp-config.php; this is due to the default setup in OS X Server.
#67) On July 11, 2005 4:51 PM
Tom -
Not at all. As long as you’re running it internally, just use localhost.
#68) On July 11, 2005 4:55 PM
Al -
No; this will work just as well on Panther. The only thing you might want to add is a bit of code to httpd.conf which instructs Apache to recognize PHP files (Tiger’s copy of httpd.conf already contains this):
<IfModule mod_php4.c> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps <IfModule mod_dir.c> DirectoryIndex index.html index.php </IfModule> </IfModule>#69) On July 11, 2005 5:11 PM
Stuart -
This definitely is a confusing problem. If MySQL was never set up and the root password is blank, how could it possibly deny you permission? Strange indeed. What I would do is go back to the “Configuring MySQL” section and try those steps again, making sure you’re getting the desired output. Also, double check to make sure the command where you set the root password is typed perfectly.
#70) On July 11, 2005 5:26 PM
Kidtrini -
I must admit I’ve never thought about a transition like that. Your best bet would be to head to Wordpress’ support page and look at questions dealing with static pages/sites; that should give you some insight on what it would take to transition over.
http://search.wordpress.org/transition+from+static+site+to+wordpress
#71) On July 14, 2005 6:45 PM
I’ve been running this perfectly for about a month now (thanks so much!), but now I’ve been given a uni webspace and a mysql password and have been given the go ahead to host it there, which would suit me better. However, to move it, the Wordpress instructions say I have to edit the .sql file - I can’t find it anywhere in the finder! I’m a complete novice at this and wouldn’t know the first thing to type into the terminal without it being spelled out for me. I need to restore it as well as make a copy of it, before I do anything, can anyone help me out?
Thanks in advance, Jo
#72) On July 14, 2005 7:13 PM
It was going so well! Then I was at my admin page, at the very last step of the tutorial when I clicked “view site”. Instead of seeing my site, I saw the test page for Apache Installation reading “If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.”
I tried installing MT on my local machine and had the same behavior a few days earlier.
Thanks!
(powerbook g4 12” - OS X 10.4.2)
#73) On July 14, 2005 9:41 PM
doh! fixed.
#74) On July 16, 2005 12:26 PM
I too, had to use the old_password function to make my local install work. I’m running OSX 10.4.2, PHP 4.3.11, MySQL 4.1.12 on Apache 1.3.33…
Awesome article!
#75) On July 19, 2005 11:56 AM
I seem to ahve the same prblem as Jeff: I receive the error when trying to go to my page �If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.�
Jeff: how did you fix this? I can only see my MT page if I type in /index.php - just going to the IP address should work, but does not. Any ideas? Thanks.
#76) On July 19, 2005 6:58 PM
Hi matt,
HELP! Ok, I followed the tutorial to the letter. I have it runing on two different servers. One is on my godaddy server (www.macmasterskully.com/wordpress/) that one is working perfectly! the other is on my mac (www.comprehensivesupportsystems.com/wordpress/) and is having a small glitch. it doesn’t send an email with a password when somebody signs-up to leave a comment. I have to enter it manually. Is there a fix for this? Please help!
jack
#77) On July 24, 2005 11:21 PM
right on. thanks for the tutorial. I had been wrestling with installing everything listed here for quite some time and after switching the mysql version back to 4.0.n, it worked as stated.
#78) On July 25, 2005 12:43 AM
Joannie -
Not to fear it’s pretty easy to move your WordPress data around, so long as you take proper steps. I’m not sure what instructions you’re referring to, but to move the WordPress database, you need to do what’s called a “MySQL dump”, where all of that database’s information is “dumped” to a text file that can then be imported into another MySQL database. For this, I use the awesome (and free!) CocoaMySQL, found at:
http://cocoamysql.sourceforge.net/
After selecting the database, you can export it by selecting File > Export > CocoaMySQL dump… The resulting file will end in .sql. Still, though, you shouldn’t need to edit it; just find your new database and import (File > Import > CocoaMySQL dump…). Always be sure to hang on to the .sql file; this is a full backup of WordPress’ data and should be kept around just in case.
#79) On July 25, 2005 1:00 AM
Jesse -
The problem you are experiencing is due to the fact that there is an index.html file in the same folder as the index.php file that belongs to WordPress. Since index.html is listed first as “recognized index files” in /etc/httpd/httpd.conf, it is picked first. Delete it (and all those other language-specific index.html.* files, and Apache will see index.php first.
#80) On July 25, 2005 1:12 AM
Skully -
Very good question, as most people don’t have this setting enabled. The reason that it’s working on your GoDaddy-hosted server is because the PHP script that sends the password uses sendmail, which is almost universally installed on service-hosted domains. However, OS X is not that, and does not have sendmail running. To fix this, you need to have sendmail or Postfix installed on your OS X box; another option is to use ssmtp, although I haven’t had any experience with this personally.
Here are links to more information on your question and how you can get mail to send:
http://codex.wordpress.org/Answers-Trouble_Shooting#Emailed_passwords_not_received
http://wordpress.org/support/topic.php?id=24981
http://packages.debian.org/stable/mail/ssmtp
#81) On July 26, 2005 2:26 PM
Tried those links. the first one helped the most. I found postfix enabler for tiger (http://www.cutedgesystems.com/software/PostfixEnabler/). That got postfix running in one click! but I am still not getting emails out of wordpress’ registration setup. I will continue to hack away on this until I get it figured out. I’ll post my findings later. Thanks Matt!
#82) On August 2, 2005 6:59 PM
Hi,
I want to first thank you for creating this great tutorial. Now I’ll slam you with my problem. I have followed this tutorial as a mean of installing MySQL and PHP. When I go to access the PHP page by page I get the following errors:
Warning: Unknown(/Library/WebServer/Documents/index2.php): failed to open stream: Permission denied in Unknown on line 0
Warning: (null)(): Failed opening ‘/Library/WebServer/Documents/index2.php’ for inclusion (include_path=’.:/usr/lib/php’) in Unknown on line 0
Ive tried to chmod 777 the files and that seems to do nothing. Any suggestions?
#83) On August 6, 2005 3:20 AM
Fyi I am a newbie.
I’ve got exactly the same error and scenarios as reported in comments #22) by Uncle Andrew “Error establishing a database connection”
I’m using OS X.3.8. Installed the Entropy-PHP-4.3.11-1.dmg from Marc Liyanage’s site. Installed the latest mySQL for my OS mySQL Standard 4.1.13 using the instructions from this tutorial. Just like Uncle Andrew the database is there, the password works, etc., etc.
I haven’t figured out the old password thing mentioned in comments #27) . What am I looking for on the linked page? Am I supposed to type
mysql> SET PASSWORD FOR -> ‘root’@’localhost’ = OLD_PASSWORD(‘password’);
verbatim? or am I supposed to change “OLD_PASSWORD” and ‘password’ to something else? does this suggestion still apply? will it keep me from using the mySQL for some other applications?
One other thing…. I read that after installing mySQL there are initial root users that need to be secured and it linked to this page.
http://dev.mysql.com/doc/mysql/en/default-privileges.html
Is there some un-secured user?
I was wondering what happened to the WP on Panther article, but I see this used to be it. :) I posted before about Personal Web Sharing comment #43) I still have the same concern about leaving PWS on when in order to test WP locally. Matt wrote in comment #45) that PWS isn’t necessary if I’m not hosting locally but the Apache test page http://localhost/ won’t open unless PWS is on.
How do you secure your Mac from being accessed from others on the internet if PWS is on? Am safe behind my router’s firewall but open to access by my Airport card?
Any pointers would be great. This is just for local testing.
#84) On August 6, 2005 8:27 PM
Lee -
It looks like the permissions for the Documents folder (located @ /Library/WebServer/Documents) has the incorrect permissions. In Terminal make sure the permissions are set to 755 (drwxr-xr-x).
#85) On August 7, 2005 11:39 AM
just what i need. I installed wordpress on my pc then bought an apple imac (love it) and was not sure how to set it up with all the reuirments of a local server. I knew that apache was already on though. Where would i go to find out how to set up phpmyadmin??
#86) On August 8, 2005 3:18 PM
Absolutely right, I control clicked on all the files in the folder and set the permissions and now it works. Thanks again for your help, those guys at PHPmac have no idea what they are talking about lol. Thanks again for your help and for creating this tutorial for people like me.
#87) On August 12, 2005 11:34 PM
The the local copy works now with a fresh install of php and mySQL (version 4.0.25). Matt was kind enough to email on my other questions, but unfortunately the old_password trick didn’t fix the issues with mySQL 4.1.13.
Thanks for the tutorial.
#88) On August 15, 2005 3:52 PM
I did the chown command and some of the files get permission denied so I just ignored it then I ran the command to start mysql and I get slapped silly with this
ERROR 2002: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
#89) On August 15, 2005 3:56 PM
I did a grep command on it to see if it existed
and thats what I got
15241 std S+ 0:00.00 grep mysqld
#90) On August 17, 2005 8:03 PM
hi, im running 10.3.9 got so far with this installation, just the last step, i know its simple, create the database for wordpress, i am an absolute dumbface, could somebody please help me correct this syntax, or tell me why, oh why it wont do the trick.
okay you can stop laughing and help me now. cheers - j
mysql> /usr/local/mysql/bin/mysql -u root -p
-> CREATE DATABASE wordpress;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘/usr/local/mysql/bin/mysql -u root -p
CREATE DATABASE wordpress
mysql> quit\h
#91) On August 18, 2005 8:12 PM
Worked fabulously, no hitches whatsoever.
I installed CocoaMySQL after that and am very happy. Thanks for the easy instructions!
#92) On August 19, 2005 11:50 PM
after many hours trying to figure out what the problem is, my php.test file comes up empty i have discovered that i have 2 different installations of apache 1. something in the WebServer directory and the other in usr/local/blah blah with the apache 2 and php 5 installation. as an aside the gecko browsers go to the WebServer location when i do the localhost thingy and the webkit browsers like safari and shiira use the usr/local new apache and php installs. how do i delete the old? should i move the new to the WebServer location?
stop laughing!
#93) On August 20, 2005 9:25 AM
Chapeu!
This site is fantastic! I would like to have some more tutorials like this one about wordpress.
Many greetings from Germany
#94) On August 20, 2005 6:36 PM
i said stop laughing!
i have resolved my apache and php problems, and now i am running apache 2 and php4.3.9 everything seems fine except that when i run the install for wordpress i get the following error: “Error establishing a database connection” all the settings are correct, mysql 4.0.21 is running fine so what gives?
any thoughts?
#95) On August 20, 2005 8:08 PM
well, i have just installed textpattern using matt’s other tutorial and i guess that narrows the problem to something with wordpress. textpattern is running fine on my local server.
#96) On August 21, 2005 8:16 AM
Matt thanks for the tutorial, after much sweat, experimentation and research my wordpress is running perfectamente bien. looking forward to your next tutorial.
#97) On August 22, 2005 2:38 PM
hi matt,
answer to your email: the only thing which I dislike is that there aren’t more such well organized and written tutorials in the web. and the thing you could improve is that you have to write more tutorials ;)
ciao from germany
domenik
#98) On August 24, 2005 12:34 AM
I have this error after typing /usr/local/mysql/bin/mysql -u root -p this and entering my password i get ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: YES) i also cannot set mysql password it gives error
#99) On August 27, 2005 7:30 AM
Great, cheers. Worked a treat. I’ve installed the wordpress folder in mu user/sites folder as opposed to the top level web werver.
#100) On August 27, 2005 5:20 PM
Please anyone, I am desperate for help. I’ve looked everywhere and no one is giving me the right answer.
My problems begin after I type (/usr/local/mysql/bin/mysqladmin -u root password mypassword)
I get this message in Terminal (error: Access denied for user: ‘root@localhost’ (Using password: NO)
Now, wordpress wont work (it used to), phpmyadmin wont work… nothing works.
I really need help.
I’m considering uninstalling mysql from my mac and reinstalling it… but I don’t know how! cries
If you can help, please please please please email me.
Thank you.
#101) On August 29, 2005 7:04 AM
How do you use pico? This is my first time hosting a blog on my own (i decided to switch from Blogger ‘cos I’ll be moving to China EOY) and I have no experience with UNIX at all. So far I have survived on copy and paste, but saving and exiting pico beats me. Could some one tell me how?
#102) On August 29, 2005 7:44 AM
Okay, so I managed to get past that one and everything’s working fine…except for one thing. How in the name of all that’s holy dya get the blog address? Can it be changed? And how do you import Blogger archives?
#103) On August 29, 2005 8:34 AM
What is it with localhost.local? What is my FTP address? And how in God’s name is this thing going to work?
#104) On August 29, 2005 10:17 PM
Nick -
By “blog address”, what are you referring to - the URL of the blog? As for importing Blogger content, check this page on the WordPress Codex:
http://codex.wordpress.org/Importing_Content#Blogger
#105) On August 29, 2005 10:18 PM
Nick -
Again, I’m not sure what you mean. localhost.local is the default address for localhost. the “.local” is added by OS X because it sees localhost as a Bonjour address; in the end it’s still just localhost. Your FTP address can be found by enabling FTP access in the Sharing preference pane of the System Preferences; the address will be printed below.
#106) On August 29, 2005 10:31 PM
Byte -
You can uninstall MySQL using a script found on Marc Liyange’s web site:
http://www.entropy.ch/software/macosx/mysql/remove-old-mysql.html
He also has instructions on how to reinitialize the MySQL database:
http://www.entropy.ch/software/macosx/mysql/#reinit
#107) On August 29, 2005 10:56 PM
Roy -
I would go though the MySQL setup process again. I can’t say I have a more definitive solution for you, but going through the motions again can often solve these types of problems.
#108) On August 29, 2005 11:34 PM
Joel -
You need to enter the /usr/local/mysql/bin/mysql command in your shell, not the MySQL prompt. Open a new Terminal window; THAT’s the shell you want to be in.
#109) On September 5, 2005 10:02 PM
Hi everyone,
First, great post - very informative. Oh, that the online world was all made of such as these.
I’ve been running a blog of .Mac using the iBlog app, and have decided to move over to WP. I think I’ve got everything running smoothly with a good customization to a “connections” themeset and am just about ready to spring my new site upon an amazed world but…
I’m running a family-wide network behind the Airport Base Station Extreme wireless router, and as such, I’ve been relegated a subnet mask of 10.0.1.3 (or summat) behind the server - in any case, definitely not an externally accessible url. How do I get out from under? Or am I firewalled off?
Appreciate any assistance in advance…
#110) On September 5, 2005 10:19 PM
Lex -
By subnet mask, I’ll assume you’re referring to the machine’s IP address. I do something very similar to you, albeit for a different reason. I access my machine from work via Apple’s Remote Desktop package, but also have a 10.0.1.x address. To get around this I have port forwarding enabling on my Base Station. Have the public port 80 forwarded to the private port 80 of 10.0.1.3 (or whatever your IP address happens to be). This will make more sense when you go to configure the Base Station.
The only problem you may run into is that, since your Mac’s IP address is handed out via DHCP, it may change. In that case, you’ll have to update the Base Station to reflect the new address. (I have to restart my [original] Base Station when I update the port forwarding information; I’m not sure if the new fancy ones have to do that or not.)
#111) On September 7, 2005 2:10 AM
Way cool…
Patrick, thanks. Saved me a lot of trouble. I was getting to the point where I was just gonna say “sod it” and go back to writing each page individually
#112) On September 11, 2005 8:58 AM
I got this error
127:/usr/local/mysql Jailanis$ sudo ./bin/mysqld_safe &
1 1495
127:/usr/local/mysql Jailanis$ Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/127.0.0.1.pid
050911 21:03:48 mysqld ended
What did I do wrong here? And of course, how to fix it?
TIA
#113) On September 12, 2005 10:06 PM
Your tutorial is awesome.
I gave your website props on my about page.
http://www.johram.com/blog/?page_id=7
later,
johnny
#114) On September 14, 2005 2:21 PM
Dan wrote “just what i need. I installed wordpress on my pc then bought an apple imac (love it) and was not sure how to set it up with all the reuirments of a local server. I knew that apache was already on though. Where would i go to find out how to set up phpmyadmin??”
I just downloaded phpmyadmin, dragged the folder into my sites folder and renamed it to give an easier address, and then edited the config.inc.php file to set the ‘root’ and ‘yourpassword’ in the server config section (a screen or so down the file). Sees the tables fine - I’m on Panther 10.3.9.
Nice tutorial!
#115) On September 20, 2005 9:55 PM
Hello: I am trying to follow the above instructions. I am unable to to change the root word of Mysql so that wordpress will recongnize it (whatever that means). All I get is the following message: /usr/local/mysql/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
Knowing nothing about Unix, I have no clue what this means, or how to proceed. Any help would be appreciated.
Thomas
#116) On September 21, 2005 10:54 PM
I cannot get Mysql version 4.0.26 to install on OSX Tiger. When I click the installer. I get a message that there is nothing to install. Any ideas?
#117) On September 23, 2005 8:26 PM
hi,
after typing
cd /usr/local/mysql
sudo chown -R mysql data/
i got this message:
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
Password:
then i am unable to type anything. i am an administrator and using mySQL 4.0.26, if it relates in any way to this problem
could anyone please help me out here? thanks!
#118) On September 23, 2005 11:44 PM
oh erm it’s alright now. realised it doesn’t show when i type password. silly me.
#119) On September 24, 2005 2:12 AM
Thomas -
This error means that the MySQL daemon (which listens for requests from things like WP) is not running. You will need to go through the “Configuring MySQL” section of the tutorial again.
#120) On September 24, 2005 3:01 AM
hi me again,
RE: enabling and testing PHP
i am unable to find the httpd.conf file in apache. did a system search and no such file turns out. however i can edit the http.conf file in the terminal (is that the editor the tutorial refers to?). can i save the httpd.conf in the terminal itself? my file name would then be httpd.conf.term. i changed it in the ‘file info’ to httpd.conf. is this right? then where should i place this new file.
when i try and test PHP, it doesn’t work! basically i get gibberish. however my apache is fine when i checked http://localhost.
PS: when i redo the steps again, the changes that i made (uncommenting) do not work.
thanks for any help!
#121) On September 24, 2005 4:40 AM
Thx again for the step by step, I have used this a long while ago and came back again after changing machines.
Just to let you know I used the new version of Wordpress and still worked like a charm.
Terrin I think the there’s a chance of your Mysql download got corrupted as I had no probs with the one from the link in the article. Good luck
#122) On September 24, 2005 11:02 AM
rQ -
You should edit the file in the Terminal, through a UNIX editor like pico. To do so, find the file in /etc/httpd and open it in pico as such:
sudo pico /etc/httpd/httpd.conf
Make your changes, hit control-O -> enter to save, then control-X. Restart Apache with “sudo apachectl graceful” and you’re all set.
#123) On September 25, 2005 7:34 PM
Hello Matt—
First, thank you for making this forum available.
When I try to make sure that PHP is running in my browser I get a 404 Error saying “The requested URL /test.php was not found on this server.” I believe Apache is running fine. I think maybe it went wrong when trying to save the test.php file in SubEthaEdit — when I click Save As it doesn’t give me a choice of saving it to /Library/WebServer/Documents. I tried saving it to just plain Documents and to Macintosh HD but neither works.
It could also be when I edited the httpd.conf file as suggested in the comments section to do this in Panther.
#124) On September 26, 2005 4:13 PM
I am having a devil of a time with this. It went alright till I hit the sql password part and no matter what i do it keeps saying:
/usr/local/mysql/bin/mysqladmin: connect to server at ‘localhost’ failed
error: ‘Access denied for user: ‘root@localhost’ (Using password: NO)’
However, mySQL seems to be connected alright, any suggestions for me?
#125) On September 26, 2005 10:51 PM
Hi,
Thanks for the great tutorial. After struggling with getting mySQL to run for an hour or so I found this page and after cleaning out sql 4.1 and replacing it with 4.0 everything was working fine.
Thanks Again.
#126) On September 28, 2005 1:53 AM
Thank you!
Worked immediately, great tutorial.
#127) On October 2, 2005 10:49 PM
Wow I’ve been trying to get php running on my machine for so long. I develop WordPress themes and this makes life a lot easier than constant FTPing.
#128) On October 6, 2005 1:33 AM
Hi matt,
I have been following comments trying to figure out how to uncomment LoadModule php4_module and just about got what I needed from post#12 when I accidently pressed ctrl k instead of ctrl u and when things dissapeared, I pressed it a few more times. I really don’t want to be afraid of the terminal but I don’t know what I did or if Imessed everythign up and I still don’t know how to delete just teh # and not the whole line. Was hoping to figure things out without asking for help, but looks like I need some. Thanks
Josh
#129) On October 6, 2005 1:35 AM
I have been following comments trying to figure out how to uncomment LoadModule php4_module and just about got what I needed from post#12
Should be 121
#130) On October 6, 2005 2:05 AM
Ok, I got the page after page stuff, sorry for freaking out. I figured that cause I didn’t save anything if I quit and then did it again all would be smiles. And I finally figured out (duh) that if something is hilighted, you hit delete and the item behind it goes away, not the hilighted character. thanks for this great tut.
Josh
#131) On October 11, 2005 4:17 AM
Hi, friends. I’m stuck at the Modify httpd stage. My PowerBook apparently doesn’t have pico, but uses nano automatically when pico is invoked. That’s all well and good, but there is no data in the httpd file. You suggest that there should be pages and pages of data, and then give instructions on modifying the file. On my mac there’s nothing to modify.
MySQL is running with no problem, and I can get to the Apache top page by going to localhost/
Can you help? I confess I’m new to Terminal and UNIX
#132) On October 14, 2005 10:29 AM
This infos is cool, recently i am running my wordpress under windows using XAMPP Apache package software and had the idea if there is something way to run also Wordpress on Mac and found this - thanks for the tutorials i am now going to test this on my new Powerbook G4. Thanks Mate. :)
#133) On October 15, 2005 7:22 PM
Great tutorial but the link to download mysql seems to be broken. It’s easy enough to find though & I got it working on the first try, thanks.
#134) On October 17, 2005 7:07 AM
Many thanks for the tutorial.
#135) On October 21, 2005 6:13 PM
This is a fabulous tutorial! I installed it on an eMac at school, and I want to use it for language arts activities. I am missing the part about configuring the mail. If a user creates their own name, the password is mailed to the email address given. How do I configure, what do I configure, or what do I do to have the passwords mailed to the new user. (Otherwise, I have a lot of typing to do.)
#136) On October 22, 2005 5:16 PM
Hi,
Tanks for the tutorial, fabulous,
#137) On October 23, 2005 10:51 PM
Thanks! it was very useful!
#138) On October 31, 2005 3:15 AM
how would i back up my databases? i’ve searched online and most of the tutorials/how-tos are about backing up from a server. i’m hosting my own server with wordpress and mysql on my own computer. if i just copy the wordpress directory, would that be enough? thanks
#139) On October 31, 2005 4:20 PM
How do I install WordPress on Panther Server, can´t find the tutorial?
Mikko
#140) On November 9, 2005 4:05 AM
Nice blog, Have a good day.
#141) On November 9, 2005 7:37 AM
Thanks very much.
This is one of the best tutorial I have come across.
I did manage to get WordPress(1.5.2) working with MySQL (5.0.15). The ‘Old Password’ im mysql does the trick.
Thanks once again. - sanjay
#142) On November 11, 2005 11:41 AM
I developed locally, then uploaded my site, but I got stuck with the database upload.
Issue 1: Make sure you select mysql4 compatibility when you are exporting your database locally. (I used phpmyadmin.)
issue 2: If you are having problems logging into your admin panel after moving your site from local to server, be sure to check out this page: http://www.tamba2.org.uk/wordpress/site-url/
It describes the process of altering your database to jive with your site’s new address. (So it will stop looking for the local address when you login.) This was an invaluable tutorial for me, and there are several other folks who commented here with the same problem and didn’t get this answer yet.
- chris
#143) On November 17, 2005 1:53 PM
Hello,
First off: amazing tutorial, really! It was a breeze to set up (once I realized that I had installed the wrong MySQL). I was wondering if anyone could shed some light on providing access to outside visitors:
I’m running WP on my Mac at home, that sits behind a Dlink router. I’ve had no problem seeing it from the computer that it’s running on but I would like to be able to access it from my PB on the same network. I noticed some advice:
Matts suggestion to Brad: Most likely, you have localhost specified as the URL in your WordPress configuration instead of a relative address (like ../index.php). Using localhost will work fine on your machine, but for anyone (including yourself) outside the machine, the code will look for the CSS on THEIR localhost. Change that and you should be good to go.
I just can’t seem to figure it out. What do I need to change in the Options section of WP? The WP URL or the Blog URL or neither?
Any help is much appreciated and thanks, again, for a wonderful tutorial!!!
#144) On November 23, 2005 12:25 AM
ok i followed the tutorial and everything worked perfect with mysql 5 until i ran the config.php and got the unable to connect error. i saw that i should have used 4.0 and went to http://www.entropy.ch/software/macosx/mysql/remove-old-mysql.html to try and remove the version i installed. i downloaded the package and ran the command to remove it and this is what i got:
das-wunder-boxen:~ eric$ sudo sh remove-old-mysql.sh
I was not able to find information about the old package, cannot continue.
any help or other methods of removing or fixing the problem with connection?
#145) On November 23, 2005 1:23 AM
nevermind guys, the OLD_PASSWORD method fixed it up with no problem. great tutorial and additional help
#146) On November 24, 2005 10:08 PM
Hi. I’ve been experimenting with WP on my PBG4. I followed all the instructions and got good results (eventually). I found information on how to reset the mySQL database useful:
sudo find /usr/local/mysql/data -type f -exec rm {} ‘;’
sudo hostname 127.0.0.1
cd /usr/local/mysql
sudo ./scripts/mysql_install_db
sudo chown -R mysql data/
#147) On November 24, 2005 10:13 PM
I installed my WordPress on SQL 5 using the OLD_PASSWORD command I found here. When I restarted my PBG4 OSX 10.4.4 indicated a permissions problem with the startup item, and gave the choice to “Fix,” “Delete,” or “Ignore.” After “Fixing,” I restarted. Thereafter, I have to manually restart Apache from the command line before my WordPress site can be found under http://localhost/. The message in the terminal as this happens reads: “httpd not running, trying to start” followed by “httpd started.” After that, http://localhost/ brings up my site. How do I get httpd to start automatically?
#148) On November 26, 2005 10:55 PM
So is the general consensus pro or con MySQL 5? I’ve been able to get WP 2.0b2 working with these instructions, but I’d like to be up-to-date on SQL if I can be.
In any event, thanks for the fantastic tutorial! I was amazed by how easy it was to set up and use WP locally.
#149) On December 1, 2005 2:51 AM
Hi thanks for the work done.
I’m a newbie in using WP on local but does MAMP could help us ?
#150) On December 4, 2005 5:42 PM
I think I’ve got myself into a lot of trouble. I didn’t find your site until after I caused myself problems. I installed mysql version 5 for mac osx and after I had problems getting wordpress to work I found on other websites that you need to uninstall the installation and reinstall an older version, but nobody described how to do it. So I proceeded in deleting the mysql directiories manually including the local directory under the root /usr/ directory (I was thinking to get it looking like it did before I installed mysql). Hopefully I didn’t delete anything important?
After deleting all of the files with mysql in it I tried to install version 4.0.26 and the installer stated there was nothing to install. Have I caused myself irreversable damage because I deleted everything?
I hope you can help.
Thanks,
StG
#151) On December 22, 2005 2:16 PM
Thanks VERY MUCH for this tutorial. I’ve been banging my head against the wall, trying to figure out how to install WordPress on my Mac OS X 10.4 Server for the past two days. I had to follow your instructions twice to get it to work.
The key to Tiger Server users is to install MySQL 4.0.20 as recommended in one of the above comments. I also used the routine someone suggested to remove any existing MySQL installations first. No luck with the Server-installed MySQL OR MySQL 4.1.16 (I think).
#152) On December 27, 2005 7:13 AM
I lost myself at this stage!!!
“….do. The only file we’ll need to edit is httpd.conf, which Apache uses for its configuration. Open the config file in your favorite editor (I’ll be using pico):…”…
can anyone help me please???
#153) On December 27, 2005 3:26 PM
unlike some of the tutorials I have been working with lately, everything went as planned working with mysql in terminal, all the way till I tried to access the http://localhost/Blog/wp-admin/install.php. I’ve checked everything, the php file, the spelling. I looked in terminal and saw that I had spelled wordpress correctly. The test.php file works fine. I put the wordpress doc in the as blog, webserver/documents/blog/. If there is something wrong with mysql wouldn’t that reflect in the test.php file also, ?
#154) On December 27, 2005 4:31 PM
rick can you please tell me exactly WHAT I HAVE TO DO to finish the installation from that point please? I mean I don’t know where the file httpd.conf is and how to edit it many thanks!
#155) On December 27, 2005 5:17 PM
wow, well, I read some more of you alls comments and followed one of the. I did “dump” of my php 4.115 and did a new install with 4.026 I think it is. Then I just followed these instructions again and against my intuition it worked. Wow!
#156) On December 27, 2005 5:22 PM
Paolo, when you have followed the “sudo pico /etc/httpd/httpd.conf” through all the way you can go up to file and save as of as you leave you will be prompted to save it (it saves it as that httpd.conf by itself) and if you look at the bottom of terminal closely you will see it, and you would choose Y for yes, save.
#157) On December 27, 2005 5:43 PM
may be I did not expressed my self properly. I run all throught the tutorial till the point “Enabling and Testing PHP”. From there I can’t locate any httpd.conf file on my powerbook therefore can’t edit it. I am simply stuck there!
Surely it’s a silly thing below my eye but I’d need proper help to proceed. Many many thanks
#158) On January 3, 2006 9:13 PM
i’ve had wordpress setup on my mac(10.4.3) with mysql 5.5 and no problems what so ever. i come back today after being away for a week and now i’m getting “Error establishing a database connection” msg. i checked and the mysql server is running and the passowrd and datbase name are correct. what could have happened?
#159) On January 8, 2006 9:44 AM
I’m also trying to get this running: on 10.4.3 (server) - and it’s starts with the default version of mysql (v 4.1.13a) and php (v 4.3.11) up until I try to actually view pages or posts. I get a can’t find document error.
I see from above that you have asked everyone else to go to mysql 4.0.20, which I have downloaded and am willing to install - but my question is this: do I have to overwrite the /usr/bin/mysql install that’s already there to get it to find this, or can I just change my config of wordpress and/or php to point at a different mysql (say in /usr/local/mysql?). I’m worried that there might be other things in OS X Server that depend on the existing mysql database…
Thanks!
#160) On January 15, 2006 2:03 PM
Same as Eric (#159) Everything working ok till updating to 10.4.4. Now I got Error establishing a database connection. Any clue? Thanks in advance ;-)
#161) On January 16, 2006 8:17 PM
I’ve been trying to get this to work, but haven’t had any luck. Right now I’m running
10.4.4
PHP 4.3.11
MySQL 4.0.26
I get the dreaded “Error establishing a database connection” message…
I’m wondering if I’m using the wrong combination of PHP & MySQL.
If anyone can help me, I’d appreciate it.
Bob
#162) On January 16, 2006 8:24 PM
One more thought: my password that I set uses both letters and numbers; the letters are lowercase. Does the password need to be letters only (I’m grasping at straws here)? Also, I tried resetting the password, using the command mentioned earlier in this thread, but the command never worked…
Bob
#163) On January 16, 2006 11:15 PM
For people dealing with the Error establishing a database connection problem… you can try this:
create a new php file with the following:
now access this file. this should show the exact error which may be different that what you expect. I thought I was dealing with the mysql password problem but it turns out that the problem was that php was looking for mysql.sock in the wrong directory.
#164) On January 16, 2006 11:18 PM
hmmm, part of my last comment was stripped out.. let’s try again.
create a new php file with the following (within the standard php tags):
$dbh = mysql_connect(‘localhost’, ‘root’, ‘YOUR_PASSWORD’)
#165) On January 17, 2006 3:04 AM
Hi
I’ve a weird problem enabling date and name-based permalinks on a Mac with OS X 10.4.
I’ve edited httpd.conf and myusername.conf to permit overrides (including 2 locations in httpd.conf), and allowed WordPress to modify the contents of a previously-blank .htaccess file.
If all three files are (AFAIK) technically correct, I get a “403 Forbidden” error.
If I either rename the .htaccess file OR remove the edit from myusername.conf, I get normal access to the directory (but no date and name permalinks).
Do you have any idea what’s causing this? Thanks!
#166) On January 17, 2006 3:06 AM
Hi
I’ve a weird problem enabling date and name-based permalinks on a Mac with OS X 10.4 and WordPress 2.
I’ve edited httpd.conf and myusername.conf to permit overrides (including 2 locations in httpd.conf), and allowed WordPress to modify the contents of a previously-blank .htaccess file.
If all three files are (AFAIK) technically correct, I get a “403 Forbidden” error.
If I either rename the .htaccess file OR remove the edit from myusername.conf, I get normal access to the directory (but no date and name permalinks).
Do you have any idea what’s causing this? Thanks!
#167) On January 17, 2006 12:43 PM
Bob, you could try phpinfo() and check the mysql section.. i’m guessing there won’t be one or it’ll be lacking something important.. also check php.ini for mysql related settings…
#168) On January 17, 2006 3:23 PM
Thanks for the suggestion; I looked, and did find a MySQL section. Are there any values that I should look at that might indicate a problem? In php.ini as well, is there a specific value that I should examine?
Thanks a lot for your help,
Bob
#169) On January 18, 2006 8:56 AM
Hello,
I’m having the same connection problem and I’ve found that its related to the OS X update to 10.4.4.
The update remove some link to the file mysql.lock.
To solve it you have to find the file. Mine is in /tmp/mysql.lock. Then you have to change the place where PHP look for the file:
sudo cp /etc/php.ini.default /etc/php.ini
edit /etc/php.ini and change
mysql.default_socket =
to
mysql.default_socket = /tmp/mysql.lock (or whatever place you have for the file)
Restart apache like Matt says:
sudo apachectl graceful
and everything works.
You can find more information here:
http://docs.info.apple.com/article.html?artnum=301457
By the way, the PHP function to connect to mysql is mysql_connect (with a “_” between “mysql” and “connect”).
Hope this help.
Domingo.
#170) On January 19, 2006 2:31 PM
I’m stuck… I can’t connect, no matter what I try. I downloaded and installed MySQL 5, hoping that it might work, but no luck.
I went to Apple’s page, read and followed their instructions, that didn’t work either.
Does anyone have the definitive instructions on which versions of PHP & MySQL work best with OS X 10.4.4?
Thanks,
Bob
#171) On January 19, 2006 3:13 PM
try mamp; http://www.mamp.info
#172) On January 20, 2006 1:05 PM
I’ve got everything installed, know php is running, the info file loads ok, I’m on 10.4.4 server. Have MySQL running with about 10 other databases running fine so I know that’s up.
The /wp-admin/install.php just returns a blank browser with no source code in Safari and Mozilla, anyone seen this?
Brian
#173) On January 21, 2006 5:44 PM
I used to have this working fin in 10.4 but since then I have redone my machine and am now on 10.4.4. I cannot get this to work anymore. I just reports the same old error each and everytime. I have tried using various versions or Wordpress, and mysql to no avail. Any suggestions.
#174) On January 21, 2006 5:44 PM
I used to have this working fin in 10.4 but since then I have redone my machine and am now on 10.4.4. I cannot get this to work anymore. I just reports the same old error each and everytime. I have tried using various versions or Wordpress, and mysql to no avail. Any suggestions.
#175) On January 22, 2006 2:51 PM
Are we thinking that 10.4.4 breaks wordpress? I wasted a whole saturday installing, uninstalling reinstalling, I get no love and just the blank screens, safari and firefox, any platoform.
#176) On January 22, 2006 8:17 PM
Just installed Wordpress 2.0 and mySQL 4.1.16 on my iBook running Mac OSX 10.4.4.
At first it didn’t work, but then i found this thread:
http://wordpress.org/support/topic/55902?replies=9
Now its up and running. Thanks for the great tutorial.
#177) On January 25, 2006 1:36 PM
This is an awesome tutorial but I couldn’t get one thing straight. I had the PHP page up and running but never got it fully running. When I try to test MYSQL this appears on Terminal:
/usr/local/mysql/bin/mysql test
ERROR 2002: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
I’m fairly new to this but not an idiot. Please Help. Thank you.
#178) On February 2, 2006 4:59 PM
thanks a bunch ya’ll.
#179) On February 8, 2006 6:04 PM
Hey, all, I’ve had some nightmares trying to get WordPress installed under OS X (followed these guidelines and other tutorials but always got a database connection error).
Well, after many days and some help from IRC and Google, I think I’ve solved it. I wanted to circulate the solution to anyone who’s having problems with a db connection error even if you know you’re using the right username/password in your wp-config.php file…
So that’s at http://wordpress.org/support/topic/60343?replies=1
Hope it works for you.
#180) On February 11, 2006 7:06 PM
I’m in the exact same mess as andrew was it, I followed this tutorial through the teeth and when the time of judgement comes the blog/wp-admin/install.php gives me
Error establishing a database connection! This probably means that the connection information in your wp-config.php file is incorrect. Double check it and try again.
Are you sure you have the correct user/password? Are you sure that you have typed the correct hostname? Are you sure that the database server is running?
I could swear that everything is set up right
thanks in advanced.
-rayson
#181) On February 13, 2006 11:56 PM
I struggled with the same issues as everyone else in establishing the database connection. I finally got it working with the following:
OS 10.4.4
PHP Version 4.3.11
MySQL 5.0.18
WordPress 2.0.1
I followed the above tutorial verbatim (very, very nice tutorial, by the way). Then I just had to follow the updated instructions at the following to get it all working.
http://docs.info.apple.com/article.html?artnum=302977
The whole thing, including learnig how to use the Pico text editor in Terminal (I’m a newbie to this stuff), took less than 90 minutes. Good luck - it can be done!
#182) On February 14, 2006 2:44 PM
I used this tutorial a few months ago and, after some putzing around, got everything working. Thank you!
Now, however, I have screwed up my mysql setup fairly royally trying to do a drupal install (I mistyped some code and am having permission access denied problems left and right). I use my local machine just to test out theme changes before I post them live, so I don’t care so much about saving the database. What I would like to do is completely get rid of the mysql I have running now, and start over with the 4.0.xx version your recommend here.
How do I go about uninstalling the mess I have created ? Thanks.
D
#183) On February 14, 2006 2:54 PM
Jeff, i’m working with the same setup. But “http://docs.info.apple.com/article.html?artnum=302977 ” is for OSX Server. What did you change to make this work?
#184) On February 14, 2006 3:26 PM
WOW!!! sorry about that, my dumb @$$ forgot to reset Apache after adding “mysql.default_socket = /tmp/mysql.sock” Up and running :)
thanks
#185) On February 27, 2006 12:52 PM
I had already installed mySQL and WP but I couldn’t edit any of the WP files (like the CSS and PHP). Even when I edited them in SubEthaEdit and resaved the files, the changes weren’t recognized by WP. Viewing WP in my browser told me that I didn’t have permission to edit the files. This is all strange to me. I had previously done all this on another Mac without any problems. Then it told me while trying to view the blog that I had an error in line 73 of wp-settings.php. I verified it against the working blog and they were identical. So I made a few other changes with permissions and what not and that didn’t work either (though it solved other issues). Then I upgraded to mySQL 4.1 and then to 5.1. After neither of those worked I downgraded back to 4.0.26. That didn’t work. Then I messed around with the tables in mySQL a little. That made a royal mess. So I decided to erase mySQL and start over. It erased fine. But now when I try and download and unzip another mySQL (regardless of version) I get the following error “You cannot continue. There is nothing to install.” I’ve downloaded it 4 times now, 4 different versions of mySQL and all the same response. Anybody have any advice?
#186) On March 4, 2006 6:38 AM
I’ve run across a couple of questions about MAMP here so here is my input. Do NOT use MAMP if you expect to serve your WP blog to the outside world. It is only intended for internal development purposes. I tried to use it over a month ago, spent a week trying to figure out why no one could access it from the outside and, after talking to Michael Doig who has an excellent tutorial of installing MAMP, found out the truth.
#187) On March 9, 2006 10:02 PM
Thank for the excellent instructions on the site including the helpfull comments of the other visitors!
Took me a while to get it up and running but.. every snag was caused by the usual suspects: started doing the install at 02:00 localtime, enjoyed a nice bottle of wine while installing and was way too impatient ;o)
So thanks again all, for me the next step will be getting every thing from .Text (asp .net) into Wordpress.
regards,
frenchy