How To Make your Mac a Web Server
Posted 08/05/2009 at 4:57pm
| by Arvind Srinivasan & Susie Ochs
7. Install a CMS
This is optional, but a CMS, or content-management system, is incredibly useful if you want to host your own blog. The most popular ones are WordPress and Drupal. To install WordPress on your system, first download the WordPress ZIP file. Unzip it and drag the WordPress folder to /Applications/MAMP/htdocs.

After changing the DB_USER and DB_PASSWORD names.
Now, browse to that WordPress folder, and open the file wp-config-sample.php in a text editor such as TextEdit. You’ll notice there is a space for DB_NAME, DB_USER and DB_PASSWORD that have things that you need to fill in. Replace ‘usernamehere’ with ‘root’ and ‘yourpasswordhere’ with ‘root’ as well. Now we need to create a database, so we can fill in ‘putyourdbnamehere.’ Leave the file open in your text editor for now.
8. Create a Database
Open the MAMP.app application, and click Open Start Page, which launches the MAMP start page in your default browser. In the toolbar along the top of that page, click “phpMyAdmin.” Under “Create new database,” enter a name for the database, and click Create.
Create your database name here.
Now, come back to the wp-config-sample.php file that’s open in your text editor, and replace ‘putyourdbnamehere’ with the name of the database you just created, enclosed in single quotes. Finally, save the modified file as wp-config.php.
9. That’s It
Now, you can browse to http://localhost/wordpress, and the WordPress Install Utility will guide you through the rest of the process. In general, you can save any file in the htdocs folder, and you will be able to access it from the Web—think of it as a file browser for the Web. Instead of browsing to htdocs on your computer, you’re browsing to your URL, and then entering the file’s path. Files that the browser can’t interpret, like music or videos, will be downloaded when you browse to them, and files that can be interpreted will be displayed. Beware of trying to download too much information from your home-rolled Web server or having too many people browse to it at once—your computer will heat up and might explode or something. If you plan on truly taking over the Internet, get someone else to host your website.