dzuelke / wordpress-12factor

WordPress, the Twelve-Factor way: fully managed using Composer and configured using environment variables.
272 stars 102 forks source link

How do I run this locally #5

Open howardmann opened 5 years ago

howardmann commented 5 years ago

Hi there I am new to Wordpress and am struggling to run this repo locally. Any help would be much appreciated

mbhnyc commented 5 years ago

working on this too @howardmann - any tricks up your sleeve now?

MELindley commented 5 years ago

I'd love to get any tips on this too @mbhnyc @howardmann @dzuelke

JimSRush commented 5 years ago

There are a couple of steps to this, but it's totally possible to do.

define('DB_NAME',     'myCoolDatabase');
define('DB_USER',     'wp_user');
define('DB_PASSWORD', 'wp_password');
define('DB_HOST',     '127.0.0.1');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

In the mysql command line, you'll also need to do this: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

This is because composer require some/package will put it straight into the wp-content file.

You'll also need to have the wp-cli tools installed.

Assuming the above is in order, you can run wp server from the terminal and inspect your site at http://localhost:8080. From there you should be able to do the 5 minute setup.

nazrinnoorzan commented 1 year ago

I tried it, but my custom theme and additional plugins doesn't get load.