Giter VIP home page Giter VIP logo

Comments (4)

PhilippHeuer avatar PhilippHeuer commented on May 27, 2024

#22 had the same issue as you now and it prob. was a misconfiguration in the .env - so you could check your config.

Im going to try to reproduce this tomorrow to help you.
Maybe it's just a error in my wiki.

from wordpress-heroku.

joshiefishbein avatar joshiefishbein commented on May 27, 2024

Hey @PhilippHeuer !!

Thanks for responding so quickly to this.

Here's my .env just in case you think it might be that:

CUSTOM_DB_URL=mysql://root:[email protected]:3306/project_name

DB_NAME=project_name
DB_USER=root
DB_PASSWORD=root

# Optional variables
DB_HOST=localhost
DB_PREFIX=escapod_

WP_ENV=development
WP_HOME=http://localhost
WP_SITEURL=${WP_HOME}/wp

# Salts below here

I've also tried messing around with the WP_HOME and WP_SITEURL variable without any luck. I've also turned off these settings in application.php:

define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);

And while turning these things to false let me connect successfully with http:// it blocks a few gets/posts that the WP core does on the admin page because of the non-SSL protocol.

Lemme know if you need any other info from to hunt this down. I love WP and I love Heroku, and I haven't ever had any success with any other build package. This is the closest I've gotten to making this relationship work and it's done in such a straightforward way, so anyway I can contribute would be great.

from wordpress-heroku.

PhilippHeuer avatar PhilippHeuer commented on May 27, 2024

I added a check so that FORCE_SSL_LOGIN and FORCE_SSL_LOGIN are only set if the WP_ENV isn't development in the application.php, thx for investigating this on your own.

So make sure you have it set to development.

// Enforce SSL for Login/Admin in production
if(env('WP_ENV') != "development") {
    define('FORCE_SSL_LOGIN', true);
    define('FORCE_SSL_ADMIN', true);
}

Now the command to run wp-cli in the wiki is wrong to start the webserver, to fix enable/disable plugins ... i had to set the path to the real wp directory - which is in turn is breaking the webserver.

Therefore you have to overwrite the path when you run the server using wp-cli to use web directly.

php wp-cli.phar server --host=0.0.0.0 --port=80 --path=web

from wordpress-heroku.

PhilippHeuer avatar PhilippHeuer commented on May 27, 2024

And you only need to set the CUSTOM_DB_URL, you can remove all the DB ENV variables as they get overwritten using the CUSTOM_DB_URL.

from wordpress-heroku.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.