Open meowist opened 9 years ago
Check this blog out. It fixes the "Can't select database problem on WordPress on Heroku".
@meowist how did you solve this? I am having the same problem and the above link posted by @jiang925 appears to be unavailable. Thanks
@ibroadfo Rebooted the server. I don't remember exactly what I did. In essence:
$db = parse_url($_ENV["DATABASE_URL"]);
$db = parse_url(getenv("DATABASE_URL"));
Thanks, @jiang925 . I believe it worked, but now I am stuck again at:
One or more database tables are unavailable. The database may need to be repaired.
Ok, I found the silly mistake. I had not payed attention to the PHP version. I was using PHP 7.0.10
on MAMP. Only when I actually looked into the logs, I noticed that it is not compatible. Switching to PHP 5.6.25
on MAMP solved the problem.
My remote config works fine on Heroku, but I can't get Wordpress to recognize my local postgres db. I followed the instructions here step by step, but still no dice: https://github.com/mhoofman/wordpress-heroku/wiki/Setting-Up-a-Local-Environment-on-Mac-OS-X
Below are screenshots to clarify what I've done on my end. I have not touched the wp-config files, which seems like a problem, but since it's not mentioned in the OSX local install instructions I left it as-is.
Any help much appreciated!
Unable to select database error: http://i.gyazo.com/12169c260615bdff26c45d9c0ec7058f.png
Database 'wordpress' does exist, user 'wordpress' exists with all privileges: http://i.gyazo.com/74db34e00da6758044434dc77fe3b6ed.png
envars file includes export for 'wordpress' database http://i.gyazo.com/7599bb363b7156dde1260cda904d13a1.png
MAMP apache server is running http://i.gyazo.com/773099b7bcaa87182d866e48163c38d5.png
MAMP points to my doc root (I changed this from the default /htdocs location): http://i.gyazo.com/94920ee0b106a12a180c432351dcb8b9.png