Support » Localhost Installs » Newbie needs some advice please

  • Hi,

    I have been thrown in at the deep end and need to look after two WordPress web sites. I want to download them onto my laptop (mac) and generally play with them and get to know them. I have never really used WordPress

    i have installed MAMP and WordPress and have a local site working. Now I assume that I need to download the web site files on my local computer. I guess I also need to download the mysql files. Where do I locate these on my laptop?

    Then how do I link WordPress to the sites? Also is it possible to have MAMP manage both sites at the same time, or do I need to keep changing the path in MAMP preferences as I work on the respective site.

    Any help tips much appreciated


Viewing 1 replies (of 1 total)
  • Norm


    Hi Alex, You would setup wordpress locally much like you set it up on the server.

    Here are the steps I usually take. I’m assuming you have MAMP setup and running properly.

    Database – Start MAMP and go to phpMyAdmin. Create a new database for the site. Name it whatever you want.

    Install WordPress – Create a folder in your local root directory for the site. Drag a fresh copy of WordPress into that folder. If you don’t know where the root directory folder is, open the MAMP control window and click Preferences > Apache and select the root folder you want to work in.

    WP-Config.php – Rename the config sample file and point WordPress to your new database by updating these three lines.

    define('DB_NAME', 'database_name_here');
    /** MySQL database username */
    define('DB_USER', 'username_here');
    /** MySQL database password */
    define('DB_PASSWORD', 'password_here');

    Copy the Database – Export your current database in .sql format (no compression) and import that file into your new database.

    Update wp-options – Go into the database locally and update the url in the wp-options table. Should be option id 1 & 37. The url should be something like http://localhost:8888/foldername.

    wp-content – Next you need to get the live wp-content folder. The uploads folder could be huge so if you are just doing some theme edits you might be able to get away with not downloading that directory. Otherwise download the folder and copy it into your local instillation.

    Find and Replace – Now you should be able to login to the site locally. The last thing I do is run find and replace on the whole site to update all the urls from whatever the domain name is to the local url. That way all your paths will work locally. You will need to redo this when you upload.

    Good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Newbie needs some advice please’ is closed to new replies.