/Applications/MAMP/conf/apache/httpd.conf
needs this line to be uncommented:
# Virtual hosts
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Also MAMP might replace this file with a default version, so make sure to back it up.
- open
/etc/hosts
:
sudo vim /etc/hosts
- add domain:
127.0.0.1 local.[REPLACE.ME]
- Configure the host:
vim /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot "/Applications/MAMP/htdocs/local.[REPLACE.ME]"
ServerName local.[REPLACE.ME]
</VirtualHost>
- Create directory for the site:
mkdir /Applications/MAMP/htdocs/local.[REPLACE.ME] && cd /Applications/MAMP/htdocs/local.[REPLACE.ME]
wp core download
-
Start MAMP, click on "start servers"
-
Open PHPMyAdmin: http://localhost/phpMyAdmin/?lang=en
-
Create DB (name as domain with underscores instead of dots: REPLACE_ME), use UTF8_BIN encoding.
-
Rename wp-config-sample.php to wp-config.php:
mv wp-config-sample.php wp-config.php
-
Insert DB name from above into wp-config.php (u/p: root/root)
-
Insert into
.htaccess
remove upload max filesize limits:
touch .htaccess && echo 'php_value upload_max_filesize 5120M
php_value post_max_size 5120M
php_value memory_limit 512M
php_value max_execution_time 3000
php_value max_input_time 3000' > .htaccess
- Enable debugging in wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
- Install WP
wp core install --url=local.[REPLACE.ME] --title=local.[REPLACE.ME] --admin_user=foobar-admin --admin_password=foobar-admin [email protected]
- Install
all-in-one-wp-migration
plugin:
wp plugin install all-in-one-wp-migration --activate && wp plugin uninstall akismet
-
Restart MAMP :)
-
Done! Login: http://local.[REPLACE.ME]/wp-admin
-
Extra: flush rewrite rules
wp rewrite flush