Thursday, May 16, 2013

Develop Website on Mac

1. Set up Development Environment

Download and Install XAMPP on Mac OS X

X (to be read as "cross", meaning cross-platform)
Apache HTTP Server
Local folder location:

Access Vis

or /Applications/XAMPP/htdocs/
It cannot be modified at first, asks for authentication
Refer to:
  1. Open applications folder
  2. Locate XAMPP folder
  3. Right click, get info (as described above)
  4. In pop-up window locate the 'sharing & permission' section
  5. Click the 'locked' padlock symbol
  6. Enter admin password
  7. Change 'Everyone' permissions to read & write
  8. In the get info window still, select the 'cog' icon' drop down option at the very bottom and select 'Apply to enclosed items' this will adjust the permission across all sub-folders as well.
  9. Re-lock the padlock symbol
  10. Close the 'Get Info' window.

2. Install Eclipse
 I used Eclipse PDT (PHP Development Tool)

Refresh a view, hold "fn" key + F5

3. Add favicon
Create your favicon

Add between <head>
    <link rel="icon" type="image/ico" href="favicon.ico"/>

Problem: refresh browser doesn't change to new favicon
Solved: clear cache in browser, force-refresh (Command +R)

but it only works when files are on the server, not locally.

4. Setup MySQL
#2002 The server is not responding (or the local MySQL server's socket is not correctly configured) 

Re-opened in a New Incognito Window, it worked; so clear the browser cache did the trick.

Refer to: Creating a MySQL Database using XAMPP

Refer to: Access MySQL Command Line in XAMPP

5. Setup Wordpress
Refer to:

  1. Download wordpress
  2. Unzip it
  3. Put the folder under your web directory, in my case /Applications/XAMPP/htdocs/
  4. Open a browser  http://localhost/wordpress/
  5. It will say I don't have a wp-config.php file, click the button "Create a Configuration File", enter Database name, User name
  6. Next page "Sorry, but I can’t write the wp-config.php file.You can create the wp-config.php manually and paste the following text into it." so create wp-config.php and change database name, user name and password.
  7. Run and install http://localhost/wordpress/wp-admin/install.php


  1. Really a pretty thing you had said here. I think this will be useful at many people. SO please keep update like this.
    Back to original

  2. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
    Digital Marketing Company in India
    seo Company in India