This repository has been archived by the owner. 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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.