Skip to content
This repository has been archived by the owner on Mar 11, 2018. It is now read-only.

Setting Up a Local Environment on Mac OS X

yujiahuang edited this page Apr 18, 2015 · 6 revisions
  • To run WordPress locally on Mac OS X try MAMP.
  • This template requires Postgres as the local database so install Postgres.app
  • Open psql, from the menubar elephant icon, and run...
CREATE DATABASE wordpress;
CREATE USER wordpress WITH PASSWORD 'wordpress';
GRANT ALL PRIVILEGES ON DATABASE wordpress to wordpress;
  • In wp-config.php, edit as follows. Make sure it matches the database and user that you just created.
$db = parse_url($_ENV["DATABASE_URL"] ? $_ENV["DATABASE_URL"] : "postgres://wordpress:wordpress@localhost:5432/wordpress");

Make sure to add this folder to the htdocs folder within MAMP. Otherwise it will not run locally.

Clone this wiki locally