![]() Now restart your browser and view and as long as your other MAMP settings are correct (remember to set the document root in the Apache tab to match where the downloaded files are ( /Users/benfrain/Sites/WordpressSite in this example) you should see a local version of your site with URL’s linking to localhost:8888 file instead of the live URL’s. It should go just above this line: require_once(ABSPATH. $mypos = strpos($currenthost, 'localhost') ĭefine('WP_HOME',' define('WP_SITEURL',' } Click on Continue button to proceed with each step of the installation. Installer package will start downloading to your Downloads folder once download is completed double click on the file to open the installer. Change ‘YOURSITE’ to match the URL of your LIVE site: /** Sets up WordPress vars and included files. Go to MAMP site and download the latest MAMP for macOS. Then add this to the end of the same file. Open the LOCAL copy of wp-config.php (in the root of WordPress) and edit your settings to match the DB name but change the DB_USER and DB_PASSWORD settings to this:.You are now done with the LIVE site by the way, you can close your FTP/SSH session for it.Import the LIVE DB into the MAMP DB with the same name (using phpMyAdmin).Open MAMP, open phpMyAdmin and make a new blank database with the SAME DB NAME as your LIVE DB.Export the LIVE database from phpMyAdmin or with SSH and save it into the same local folder (if using phpMyAdmin and you have a large DB, you can gzip the export file as phpMyAdmin can import gzip files in MAMP (up to 32MB in size)).Download the existing WordPress site files from the LIVE site (either FTP or SSH) to a local folder on OSX (e.g.It promised to let me keep the DataBase in tact and still get the updated URL’s – perfect, no? Sadly, as ever things didn’t go exactly right. However, I noticed this entry on the WordPress Codex. localhost:8888/file), rather than the remote ones (e.g. ![]() Whenever I have done this previously I have used something like Velvet Blues Update URL’s plugin so that URL’s went to the local links (e.g. I had my WordPress site here () and wanted a local MAMP based version for testing changes before pushing it live. Hopefully, if you’re in the same boat this will help. However, perhaps it’s my imagination but it seems I always have to do things differently to get things working. Crucially, it will automatically amend your url’s from /file to localhost:8888/file without having to alter the DataBase. This post explains how to make a local development version of a standalone WordPress website (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |