Comments (3)
You can configure your local wordpress installation by adding a .env
file in the directory root:
# DB Connection
CUSTOM_DB_URL=mysql://user:password@host:3306/databaseName
# WP Settings
WP_ENV=development
WP_HOME=http://localhost
WP_SITEURL=${WP_HOME}/wp
# Generate your keys here: https://roots.io/salts.html
AUTH_KEY='generateme'
SECURE_AUTH_KEY='generateme'
LOGGED_IN_KEY='generateme'
NONCE_KEY='generateme'
AUTH_SALT='generateme'
SECURE_AUTH_SALT='generateme'
LOGGED_IN_SALT='generateme'
NONCE_SALT='generateme'
And then you can run it on any machine you have php installed on with WP CLI
:
php wp-cli.phar server --host=localhost --port=80
You may have to install a database server locally, if you do not have any dedicated server and don't want to use heroku's.
Thanks for the issue, missed this part in the documentation.
If this didn't answer your question just respond here - closing it.
from wordpress-heroku.
Thanks for answer.
Now I have a problem with the database.
When install I choose "heroku addons:create cleardb:ignite"
Locally i have mysql and create new db "wordpress"
My "CUSTOM_DB_URL=mysql://root:root@localhost:3306/wordpress"
When i start local server i have database connection error
https://www.dropbox.com/s/ea71m5y0bc76l61/Screenshot%202017-06-15%2002.27.33.png?dl=0
Maybe I need to do something else to make everything work locally?
from wordpress-heroku.
I tested it locally, which worked fine with MySQL.
This error shows that it can't reach your mysql server at localhost:3306
. Are you sure that it's 127.0.0.1
and the port is 3306
and that the service is reachable? Some packages use a non-default port.
It could also be caused by the deprecated mysql extension, since the mysqli extension is missing. Based on this error im guessing that you run PHP 5.5 or 5.6 without the mysqli
extension, yes?
You can either install the mysqli extension or upgrade to PHP7 (which i recommend) - Both should fix your issue. Heroku is using PHP7 too.
from wordpress-heroku.
Related Issues (20)
- Wordfence could not get an API key from the Wordfence scanning servers when it activated HOT 1
- Wp-admin password HOT 2
- The uploaded file could not be moved to uploads HOT 12
- Blank browser page on local machine for brand new WP site HOT 1
- Error when connecting to local WP Admin: Invalid request (Unsupported SSL request) HOT 4
- Can't run wp-cli server locally HOT 2
- Setting up Multisite HOT 6
- Some key can't parse correctly AWS_S3_URL HOT 1
- custom domain name HOT 5
- More languages [SOLVED] HOT 4
- Add others Language to Wordpress HOT 1
- DB error on local environment construction
- how to upload my own theme & plugin not exist as public ? HOT 1
- Adsense - Failed to load resource: net::ERR_CONNECTION_REFUSED
- Database caching help needed
- Image sizes not respected HOT 1
- When trying to Deoply to Heroku - the configuration of SendGrid add-on fails HOT 1
- Heroku teams deploy fails
- Any plans to upgrade dependency versions? HOT 6
- How to add my plugins locally then push to heroku ? I need a simple 1,2,3 steps guide
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-heroku.