Home » Technology » Apple & Macs » ISP-In-A-Box: The $500 Mac mini (HOW-TO Become A WordPress BlogMaster, Part I)

The Most Versatile VoIP Provider: FREE PORTING

ISP-In-A-Box: The $500 Mac mini (HOW-TO Become A WordPress BlogMaster, Part I)

So you want to be a BlogMaster, but you want to host your blog on your very own Mac rather than paying a managed hosting service such as Blogger or TypePad. And you’ve elected to ignore our previous advice to use a hosting provider that offers MySQL database management, PHP, and blogging software as part of their feature set for free. Well, good for you! And you’re in luck because today, rejuvenated from our Spring Break cruise aboard the good ship Disney Wonder, we’re going to install the brand-new WordPress 1.5 on your Mac. This is the latest and greatest version of the blogging system that we use for Nerd Vittles which just happens to be what you’re reading now. In naming WordPress as the Web Application of the Year, ArsTechnica put it this way:


Let’s face it. Blogs are in fashion, and why not? Vanity knows no bounds, and there are some people who actually do something productive with theirs. From the influence of blogs on the coverage of the US presidential elections to every random teenager who has problems with their partner/parent/teacher/cat, blogs are out there allowing your most intimate feelings to be shared with random people at wifi hotspots. WordPress is the most prominent rising star of weblog software, completely free and with a large and active community. Styles, plugins and hacks are readily available, with problems such as comment spamming being addressed far more rapidly than competing applications.

We couldn’t have said it better. So let’s get started.

Prerequisites. Before you can bring up WordPress and begin your blogging career, you first need to figure out what you want to write about. Hopefully, it will be something in which others have an interest. And with Dan Rather now retired, conservative bloggers will actually have to come up with something new to whine about. But, who cares, right? You can always change your mind tomorrow, and the next day, and the next if you install and manage your own blogging system. On the hardware and software side, you’ll need a Mac running Mac OS X v10.3, aka Panther. And you also will need to install and activate five of the applications we covered in previous sessions before you begin this installation. You’ll need the Apache Web Server, the Postfix SMTP mail server only, the MySQL database server, and PHP and PhpMyAdmin. Once you complete these tutorials, read on. Don’t attempt to install WordPress prematurely, or you’ll make a big mess, and we don’t provide mess cleanup tutorials! For a complete list of our HOW-TO articles and Mac mini resources on the Net, click here.

Downloading WordPress. If you didn’t already know, WordPress is free for the taking, but you still have to download it from here. Just click on the Download .tar.gz link. This should download the software to your Desktop and automatically decompress it into a folder named wordpress. If you just end up with a .tar.gz file, simply double-click on it to decompress it into a folder. Now click once on the folder name and change the name of the folder to blog and press the return key. Next double-click on the folder to open it. Then double-click on wp-config-sample.php to open it with TextEdit. Look for the DB_USER line and change the word username to root. Now move down to the DB_PASSWORD line and delete the word password but leave the single quotes that were surrounding it. When you’re finished, it should show two single quotes with no spaces between them. Now press Command-S to save your changes. Close TextEdit, and then single-click on the filename wp-config-sample.php. Change the filename to wp-config.php and press the return key. Close the folder. Using Finder, click on the local hard disk, and move to the /Library/WebServer/Documents folder. Now click-and-drag the blog folder on your Desktop into the Documents folder. This will make your blog accessible at any of the following addresses: http://localhost/blog/ or http://127.0.0.1/blog/ or http://your.internal.ip.address/blog/ or http://your.Internet.ip.address/blog/ assuming you have activated the security settings set forth in our Network Security article. In addition, you can access your blog at http://yourdomain.com/blog/ if you have completed the domain registration steps outlined in our Domain Names article.

Installing WordPress. Like many open source applications, WordPress is a PHP-driven application that stores its data in a MySQL database with numerous MySQL tables. So, in order to use WordPress, we first need to create a MySQL database named wordpress to house the data. We’ll do this using PhpMyAdmin. Open a web browser on your server and go to http://localhost/php/. At the top of the right frame is a field for Create new database for MySQL. Type wordpress in the space provided, change the collation sequence to ascii.bin, and click the Create button to create the new MySQL database. Close that browser window and open a new one. Now go to http://127.0.0.1/blog/wp-admin/install.php. The Welcome to WordPress screen will appear. Click on the First Step link. Fill in a title for your new blog and your email address, and then click Continue to Second Step. Surprise! The installation is complete. Just be sure you write down your username (admin) and the randomly generated password. We’ll change it in a minute.

Configuring WordPress. Now click on the login link which will take you to the login screen: http://127.0.0.1/blog/wp-login.php. Type your username and password that you just wrote down. The Admin Dashboard will display with all sorts of information about WordPress. But let’s do first things first. Click on the Users tab at the top of the screen. Type in your name and any other desired extras you want to publish with your blog. Move to the two fields provided to change your password, and type your new permanent password twice. Then click the Update Profile button. Log out and back in just to be sure everything is working as it should. In a new browser window, go to http://127.0.0.1/blog/ and Voila. Welcome to Bloggerville! From your blog’s main page, you can return to the Admin program by clicking on the Admin link. You shouldn’t have to log in again assuming cookies are enabled and functioning properly on your system.

From the Administration program, you add new articles to your blog by clicking on the Write tab. And you can View, Edit, or Delete articles by clicking on the appropriate link beside the article of interest using the Manage tab. That should be enough to get you started in your blogging career. In our next session, we’ll talk about Plugins and Templates and Themes as well as how to protect your blog from the bad guys. We’ll also go into further detail about many of the WordPress 1.5 features that have made it such a popular blogging system. Your homework is to pay a visit to Alex King’s incredible WordPress resource site. While you’re there, look through the Themes section and find a look you like for your new blog. Our personal favorite is Meadow (see inset above). We’ll walk you through installing it (or your personal favorite) in our next session. For now, get those creative juices flowing and blog your socks off!


3 Comments

  1. Could you briefly explain why the Postfix SMTP mail server needs to be installed before installing WordPress? I hesitate to try installing Postfix SMTP mail server because of your warning ( http://mundy.org/blog/index.php?m=20050202 ) that for most folks it is probably a bad idea, and also because I know that my ISP requires all SMTP traffic to go through them.

    [WM: Very good questions. In our next article, we’re going to configure WordPress to only allow moderated comments (just like we use with Nerd Vittles). This lets you control what gets posted to your blog and gives you a way to eliminate comments from creeps and automated systems. For this to work, there has to be a way to notify you when comments are posted, and that’s what you need the Postfix SMTP server for. You do not need to open a port in your firewall for incoming SMTP traffic because all we want to do is send messages, not receive them. So you’re still safe from spammers.

    Your ISP’s requirement that SMTP traffic flow through their SMTP server poses another problem. If you only enable Postfix and try to send messages, they simply won’t get delivered which isn’t helpful obviously. The solution is to tell Postfix to relay outgoing messages through your ISP. We do this by changing a line in the Postfix config file to tell it to use your ISP as a relay host. Open a Terminal window and switch to root access: sudo su. Then move to the Postfix folder where the config file is stored: cd /etc/postfix. Now edit (carefully) the config file: pico main.cf. Search for relayhost 3 times: Ctrl-W, relayhost, enter, Ctrl-W, enter, Ctrl-W, enter. Now uncomment one of the relayhost lines with Ctrl-D and change the host address to the fully-qualified domain name or IP address of your ISP’s SMTP server, e.g. smtp.comcast.net. Save your changes: Ctrl-X, Y, then enter. Now restart Postfix or reboot your Mac. Send a test message to yourself using localhost as your SMTP server or just post a comment to your blog (after we complete the steps in the Part II article) and check the headers to be sure it worked correctly, and you’re all set.

    Another approach (which I have now tried) is to modify the operation of PHP using the php.ini configuration file in the /etc folder so that PHP sends SMTP messages out through your ISP’s SMTP server rather than through localhost. The advantage in going this route would be that you wouldn’t need to activate Postfix. Unfortunately, it only works on Windows platforms for some inexplicable reason. ]

  2. I experienced one problem following your instructions, regarding the collation on the wordpress database. I had all sorts of MySQL errors when trying to edit my blog options. Dropping the database, then creating it with the default collation (which for me apparently is ?¢ÀÜ?°?ɂİ?Ǭ¨?¢‚Ǩ¬†latin1_swedish_ci?¢ÀÜ?°?ɂİ?Ǭ¨?¢‚Ǩ¬†) and rerunning the WordPress installer fixed the issue.

  3. I followed your instructions very closely however, I have one problem that I don’t know how to solve.. maybe you can point out where i did wrong. I can see the blog pages fine with the nice default template on my machine. However, when i try to access the blog page from another machine on the LAN… I get only the text, there are no images and the page is not even formated correctly. I tried using other "themes" same problem. What’s worse is that another computer outside the LAN could see the blog with just the text when the theme is set to default (like my other computer on the LAN) and can’t see anything (get error) with other themes other than default. Any idea why?

    [WM: This is a common problem if you are trying to access a WordPress blog with a different site address than what you specified when you set up the blog. For example, you can’t use a private IP address or localhost for your site if you want users on the Internet to be able to access it. You can change the two addresses under the Admin->Options menu to solve it.]

Comments are closed.