Skip to content

Instantly share code, notes, and snippets.

@dbushell
Last active November 23, 2015 10:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbushell/403bd7bdf3072392ba86 to your computer and use it in GitHub Desktop.
Save dbushell/403bd7bdf3072392ba86 to your computer and use it in GitHub Desktop.
WordPress local development (MAMP)
Easy steps for cloning a live WordPress site for local development with MAMP. Am I missing anything?
1. add new MAMP server
2. download all files
3. export MySQL database
4. import SQL to MAMP via command line:
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -p dbname < ~/Downloads/database.sql
5. update: wp-config.php
define('DB_NAME', 'dbname');
define('DB_USER', 'root');
define('DB_PASSWORD', '[PASSWORD]');
define('DB_HOST', 'localhost');
define('WP_SITEURL', 'http://localhost.dev');
define('WP_HOME','http://localhost.dev');
6. done?
@maxkandler
Copy link

@tobaco Ouch, sorry. I confused it with https://wordpress.org/plugins/better-search-replace/ just by the title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment