Installing WordPress
I am going to make the assumption that downloading and placing all the WordPress components in the right place is already known.
If you are using the ‘Documents’ folder, then place the WordPress root files in there (i.e., that is where the file config.php needs to reside). You will need to clear out all of the files currently in this folder which consist of the Apache documentation. Don’t throw them away however - one day you may want to read through them!
if you have defined your own folders and set up Virtual Hosts, then place the root WordPress files in the folder you have specified.
When you have everything copied over you are going to need to perform three more tasks before finding out if everything worked!
config.php
Firstly, open up the config.php file for editing. You are going to need to edit the top three items that you set up back in the MySQL installation. That is the name of the database you created, the name of the MySQL user (which was ‘root’) and the password you chose. Fill these in.
Take a look at the table prefix as well. By default it is set to ‘wp’. If you want to copy your public database to your local system then ensure you use exactly the same prefix in both places. When you are done, save and close the file.
.htaccess
While you have a text editor available you may as well also create an empty .htaccess file. Create a new plain and empty text file with the name:
.htaccess
and make sure you include that first dot. Place this in the same folder as the config.php file. You are going to need to give that file write priviliges.
Turning it all on
And finally - back to System Preferences! Click on the MySQL preference pane and ensure MySQL is up and running. Then visit the ‘Sharing’ panel and stop Apache. When it has stopped you can start it again.
Now try and access your new local website in your browser. use the full website name you set up if using Virtual Hosts - or the address:
http://127.0.0.1
if you placed your files in the Documents folder.
If all has gone according to plan, WordPress has just invited you to install the system.
Themes and Plugins
Relevant only if you plan to make your local system a clone of your public system, you will need to copy your theme and plugin files as well as any images and other content that may be on your public site.
Most usually and in normal use, this material consists of all of the files and folders that sit beneath the WordPress ‘wp-content’ folder.
Obvious methods are using FTP, or, if your host provides an admin tool like cPanel, making a full backup of your site and downloading the resulting compressed file.
Whatever options are available to you it is important that themes and plugins - especially plugins - are downloaded and added to your local site prior to cloning the database.
Next: Cloning The Database