• I have been building a site online, and I’m going to be without the net for the next fortnight and I still need to work on this site.

    So basically I want to take the site offline so I can continue working on it, and then be able to put it back online when the time comes.

    I’m on a mac, so I’m using MAMP.

    I’ve just done a clean install of wordpress locally, and it’s working fine. So my next big step is the transfer. Can anyone help me?

    Thanks guys!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator cubecolour

    (@numeeja)

    1. Copy the backup of wp-content into MAMP

    2. Import the database backup into the MySQL db on MAMP

    3. update your hosts file to point your domain address to 127.0.0.1

    4. Profit!

    Instead of (3.) you can do a search & replace on the db, but if you’re offline it probably less hassle to do the hosts file thing even though you’d need to remember to delete the hosts file entry & clear the DNS cache when you’re back online.

    Thread Starter ribena_wrath

    (@ribena_wrath)

    wow, thanks for your speedy reply!

    Could you elaborate a bit more on these points? I’ve installed MAMP today for the first time. First time building localhost.

    Or could you point me to some links that would help me along the way?

    Thanks again!

    Moderator cubecolour

    (@numeeja)

    I use XAMPP rather than MAMP, but it should be much the same on both.

    If you edit the hosts file to point the domain at the localhost address as I mentioned, you will not be able to get to your online version of the site, so be prepared for that.

    This article pretty much covers editing hosts & clearing DNS cache – although it is for Leopard, it should be the same for Snow Leopard:
    https://decoding.wordpress.com/2009/04/06/how-to-edit-the-hosts-file-in-mac-os-x-leopard/

    Thread Starter ribena_wrath

    (@ribena_wrath)

    I tried that and it did not work, wouldn’t let me type my password in.

    I’m stuck with the following,

    ‘Import the database backup into the MySQL db on MAMP’

    ‘update your hosts file to point your domain address to 127.0.0.1’

    How do I do these and what do they do?

    So far I’ve moved my content folder from my hosting account to my MAMP folder, replacing the default ‘content’ folder. Is this right so far?

    Sorry to be such a noob at this! But I appreciate your time ??

    Moderator cubecolour

    (@numeeja)

    The hosts file overrides DNS, linking domain names to IP addresses, so putting a static rule in your hosts file can link your domain to a web server running locally.

    This means that if your site is at https://www.yourcooldomain.com, after adding the appropriate hosts entry you can type https://www.yourcooldomain.com into the browser and you get the local version of your site.

    You can import your database backup from your live site into the local installation via phpMySQL.

    Thread Starter ribena_wrath

    (@ribena_wrath)

    still haven’t managed to get this working ?? so I will lay out everything I have done and hope you may be able to spot something I missed,

    I have been building a site online using wordpress on siteground servers.
    I am without the internet next for a fortnight, so I need to take my build offline for a while.
    I have installed MAMP on my Snow Leopard iMac, and I have a green light for both Apache and MySQL servers.
    I did a fresh install of wordpress on my localhost.

    Then I downloaded all the files from siteground severs using FTP. I copied all the files from ‘public HTML’ folder, and replaced the files on my localhost with them.

    Then I updated my database details using this,
    https://kb.siteground.com/article/How_to_transfer_my_WordPress_from_one_host_to_another.html

    Should all work right? Is there something I missed out?

    So when I go to my localhost address, https://localhost:8888 it just comes up with the default wordpress site. My plugins and themes and edited CSS are all there, but none of my content is there. Just default wordpress web content.

    I think one issue may be, as quoted from the siteground page;

    ‘Transferring your WordPress application includes copying your files and database and modifying the wp-config.php file in your main WordPress folder.’

    I don’t know what copying database files is or how to do it…is this the reason my localhost won’t work?

    Thanks for your time, hopefully I can get this working soon because I need it to work!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Move online site offline with MAMP, then back online’ is closed to new replies.