heroku-wordpress icon indicating copy to clipboard operation
heroku-wordpress copied to clipboard

White Page after Deploy

Open InnoExcell opened this issue 4 years ago • 21 comments

Hi, thanks for the whole work going on here. I deployed wordpress to my heroku account following the guide here. However, anytime I access the site, I get a white blank page. The same applies to the wp-admin page. It seems I am missing something out...

How do I resolve this issue? Many thanks.

InnoExcell avatar Jul 09 '21 01:07 InnoExcell

Hi @InnoExcell

Please attach log file with errors.

javadev avatar Jul 09 '21 01:07 javadev

Sorry, but how do I obtain the log files?

Here is a link to the site: http://calm-plateau-85060.herokuapp.com/wp-admin/

InnoExcell avatar Jul 09 '21 01:07 InnoExcell

View logs menu in heroku.

IMG_20210709_050218

javadev avatar Jul 09 '21 02:07 javadev

Got it, sir. Thanks. calm-plateau-85060-logs-1625796279322.txt

InnoExcell avatar Jul 09 '21 02:07 InnoExcell

It looks like postgres database is not present.

thrown in /app/wp-content/pg4wp/driver_pgsql.php on line 686

Please check addon

IMG_20210709_050937

javadev avatar Jul 09 '21 02:07 javadev

It is actually present. postgres addon present

InnoExcell avatar Jul 09 '21 02:07 InnoExcell

Does this offer any additional insight? line 686

InnoExcell avatar Jul 09 '21 02:07 InnoExcell

I reproduced this error locally. Will investigate it.

IMG_20210709_052609

javadev avatar Jul 09 '21 02:07 javadev

All right, many thanks for your timely response and help.

InnoExcell avatar Jul 09 '21 02:07 InnoExcell

BTW, is the idea of using Postgres with Wordpress a bad one? please check out the comment here Thanks again.

InnoExcell avatar Jul 09 '21 02:07 InnoExcell

This is because of Postgres 13. I checked with version 11. It works.

javadev avatar Jul 09 '21 03:07 javadev

Many thanks @javadev How do I downgrade the app to version 11?

InnoExcell avatar Jul 09 '21 03:07 InnoExcell

It will be better to add compatibility with version 13.

javadev avatar Jul 09 '21 04:07 javadev

oh, got it. Who is responsible for adding compatibility, sir? (Pardon my questions pls, I'm but a novice).

InnoExcell avatar Jul 09 '21 04:07 InnoExcell

The error message is

[09-Jul-2021 09:07:19 UTC] PHP Warning:  pg_query(): Query failed: ERROR:  relation "wp_options" does not exist
2021-07-09T09:07:19.488283+00:00 app[web.1]: LINE 1: SELECT option_name, option_value FROM wp_options WHERE autol...
2021-07-09T09:07:19.488497+00:00 app[web.1]:                                               ^ in /app/wp-content/pg4wp/driver_pgsql.php on line 137
2021-07-09T09:07:19.488934+00:00 app[web.1]: [09-Jul-2021 09:07:19 UTC] PHP Fatal error:  Uncaught TypeError: pg_result_status(): Argument #1 ($result) must be of type resource, bool given in /app/wp-content/pg4wp/driver_pgsql.php:686

javadev avatar Jul 09 '21 09:07 javadev

It looks like create table is not working for postgres 13.

CREATE TABLE $wpdb->options (
	option_id bigint(20) unsigned NOT NULL auto_increment,
	option_name varchar(191) NOT NULL default '',
	option_value longtext NOT NULL,
	autoload varchar(20) NOT NULL default 'yes',
	PRIMARY KEY  (option_id),
	UNIQUE KEY option_name (option_name),
	KEY autoload (autoload)
) $charset_collate;

javadev avatar Jul 09 '21 09:07 javadev

I see. Please, how do I deploy this same wordpress to heroku, using Postgres version 11 instead of 13?

InnoExcell avatar Jul 09 '21 12:07 InnoExcell

I will try to fix php code to make it working with postgres 13.

javadev avatar Jul 09 '21 13:07 javadev

OH, that will be great. Thanks in anticipation.

InnoExcell avatar Jul 09 '21 15:07 InnoExcell

Hi, Was there any progress on this?

akashkj avatar Sep 30 '21 20:09 akashkj

Not yet. The problem is known: incompatibility with postgres 13.

javadev avatar Sep 30 '21 20:09 javadev