I’ve finally managed to upgrade a WP site from v5.0 to v5.4. The only issue left is when I create an empty functions.php file I get 500 error.
Does someone have an idea why is that? Thanks.
Update:
My goal is to place the following into functions.php:
function my_acf_init() {
acf_update_setting('google_api_key', $_ENV['GOOGLE_MAPS_API_KEY']);
}
add_action('acf/init', 'my_acf_init');
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
I’ve managed to print the error message by adding the following to the functions.php:
function exception_handler($exception) {
echo "Uncaught exception: " , $exception->getMessage(), "n";
}
set_exception_handler('exception_handler');
For some reason logs did not include the error details before.
The error is call to undefined function is_blog_installed() which I have no idea why’s that. 😀
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0