Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I run this locally #5

Open
howardmann opened this issue Dec 30, 2018 · 4 comments
Open

How do I run this locally #5

howardmann opened this issue Dec 30, 2018 · 4 comments

Comments

@howardmann
Copy link

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

@mbhnyc
Copy link

mbhnyc commented Jan 21, 2019

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

@MELindley
Copy link

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

@JimSRush
Copy link

JimSRush commented Aug 9, 2019

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

  • assuming you have a locally setup mysql instance running and have created a database, you can change your wp-config.php file to include the following:
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';

  • also in the wp-config file, you'll need to change:
    define('WP_CONTENT_DIR', dirname(__FILE__) . '/wp-content/'); to
    define('WP_CONTENT_DIR', dirname(__FILE__) . '/wordpress/wp-content/');

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
Copy link

nazrinnoorzan commented Mar 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants