Cannot view site via local

I installed Local by Flywheel yesterday.
I used Duplicator to duplicate live WP site hosted on SiteGround.
I downloaded package and imported site.
Under Database, entries are populated and no errors showing.
But when I click View Site it goes to browser http://sitename.dev/ and says HTTP 500 The website cannot display the page.

Does anyone have any thoughts as to what could be causing problem or what I need to do to fix?

Hi John,

It’s most likely a PHP error.

I’d check PHP’s error.log file. You can find it by going to the site’s location on your computer (click on the circled arrow by the site path to open it) and then go into the logs/php directory.

Also, enabling WP_DEBUG may be worthwhile: https://codex.wordpress.org/Debugging_in_WordPress#WP_DEBUG

Hi Clay

Thank you for your help but I am afraid I am still stuck.

As you suggested I have enabled WP_DEBUG define(‘WP_DEBUG’, true);

In the php error.log file this is what I am seeing

PHP Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘username’@‘localhost’ (using password: YES) in /app/public/wp-includes/wp-db.php on line 1603

Any further thoughts on what the problem might be?

Based off of that error, I’m assuming the database info in wp-config.php is invalid.

With Local, the database username and password are both root and the database is local.

Hi Clay

Thanks - almost there.

I have amended wp-config.php as you suggested and that appears to work fine now.

But when I click ‘view site’ instead of viewing the .dev site LOCAL is going to the live .com site?

What do I need to do to rectify?

Regards
John

Great!

For the redirect issue, please see my instructions in this post: New Local site created from archive not working

Hi Clay

As always thanks for you help.

I followed those instructions and now when I click on ‘view site’ the URL displays domain.dev but it’s still not displaying site content but a long list of errors as per php error log below.

I have tried stopping a starting local site and PC re-start etc. What should I try next?

[10-Nov-2017 16:58:38 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; GDLR_Import has a deprecated constructor in /app/public/wp-content/plugins/goodlayers-importer/goodlayers-importer.php on line 28
[10-Nov-2017 16:58:38 UTC] PHP Stack trace:
[10-Nov-2017 16:58:38 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:38 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:38 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:38 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:38 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:38 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 16:58:39 UTC] PHP Stack trace:
[10-Nov-2017 16:58:39 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:39 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:39 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:39 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:39 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:39 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP   7. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:58:39 UTC] PHP   8. wp_enqueue_script() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:47
[10-Nov-2017 16:58:39 UTC] PHP   9. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:267
[10-Nov-2017 16:58:39 UTC] PHP  10. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 16:58:39 UTC] PHP  11. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 16:58:39 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 16:58:39 UTC] PHP Stack trace:
[10-Nov-2017 16:58:39 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:39 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:39 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:39 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:39 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:39 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP   7. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:58:39 UTC] PHP   8. wp_enqueue_script() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:49
[10-Nov-2017 16:58:39 UTC] PHP   9. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:267
[10-Nov-2017 16:58:39 UTC] PHP  10. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 16:58:39 UTC] PHP  11. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 16:58:39 UTC] PHP Notice:  wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 16:58:39 UTC] PHP Stack trace:
[10-Nov-2017 16:58:39 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:39 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:39 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:39 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:39 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:39 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP   7. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:58:39 UTC] PHP   8. wp_enqueue_style() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:52
[10-Nov-2017 16:58:39 UTC] PHP   9. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-styles.php:165
[10-Nov-2017 16:58:39 UTC] PHP  10. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 16:58:39 UTC] PHP  11. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 16:58:39 UTC] PHP Notice:  Undefined index: SERVER_PORT in /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php on line 138
[10-Nov-2017 16:58:39 UTC] PHP Stack trace:
[10-Nov-2017 16:58:39 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:39 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:39 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:39 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:39 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:39 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP   7. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:58:39 UTC] PHP   8. royal_prettyphoto_get_full_url() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:112
[10-Nov-2017 16:58:39 UTC] PHP Notice:  Undefined index: SERVER_PORT in /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php on line 138
[10-Nov-2017 16:58:39 UTC] PHP Stack trace:
[10-Nov-2017 16:58:39 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:39 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:39 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:39 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:39 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:39 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP   7. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:58:39 UTC] PHP   8. royal_prettyphoto_get_full_url() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:112
[10-Nov-2017 16:58:39 UTC] PHP Notice:  Undefined index: SERVER_NAME in /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php on line 139
[10-Nov-2017 16:58:39 UTC] PHP Stack trace:
[10-Nov-2017 16:58:39 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:39 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:39 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:39 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:39 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:39 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP   7. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:58:39 UTC] PHP   8. royal_prettyphoto_get_full_url() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:112
[10-Nov-2017 16:58:39 UTC] PHP Notice:  Undefined variable: royal_prettyphoto_tab_url in /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php on line 120
[10-Nov-2017 16:58:39 UTC] PHP Stack trace:
[10-Nov-2017 16:58:39 UTC] PHP   1. {main}() /usr/local/bin/wp:0
[10-Nov-2017 16:58:39 UTC] PHP   2. include() /usr/local/bin/wp:4
[10-Nov-2017 16:58:39 UTC] PHP   3. include() phar:///usr/local/bin/wp/php/boot-phar.php:5
[10-Nov-2017 16:58:39 UTC] PHP   4. WP_CLI\Runner->start() phar:///usr/local/bin/wp/php/wp-cli.php:21
[10-Nov-2017 16:58:39 UTC] PHP   5. WP_CLI\Runner->load_wordpress() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:945
[10-Nov-2017 16:58:39 UTC] PHP   6. require() phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:1008
[10-Nov-2017 16:58:39 UTC] PHP   7. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:58:45 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_sidebar_array() on null in /app/public/wp-content/themes/lawyerbase/include/gdlr-admin-option.php:264
Stack trace:
#0 /app/public/wp-includes/class-wp-hook.php(298): gdlr_create_admin_option('')
#1 /app/public/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#2 /app/public/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /app/public/wp-settings.php(432): do_action('after_setup_the...')
#4 phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(1008): require('/app/public/wp-...')
#5 phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(945): WP_CLI\Runner->load_wordpress()
#6 phar:///usr/local/bin/wp/php/wp-cli.php(21): WP_CLI\Runner->start()
#7 phar:///usr/local/bin/wp/php/boot-phar.php(5): include('phar:///usr/loc...')
#8 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#9 {main}
  thrown in /app/public/wp-content/themes/lawyerbase/include/gdlr-admin-option.php on line 264
[10-Nov-2017 16:59:12 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; GDLR_Import has a deprecated constructor in /app/public/wp-content/plugins/goodlayers-importer/goodlayers-importer.php on line 28
[10-Nov-2017 16:59:12 UTC] PHP Stack trace:
[10-Nov-2017 16:59:12 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 16:59:12 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 16:59:12 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 16:59:12 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 16:59:12 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 16:59:12 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 16:59:12 UTC] PHP Stack trace:
[10-Nov-2017 16:59:12 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 16:59:12 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 16:59:12 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 16:59:12 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 16:59:12 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 16:59:12 UTC] PHP   6. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:59:12 UTC] PHP   7. wp_enqueue_script() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:47
[10-Nov-2017 16:59:13 UTC] PHP   8. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:267
[10-Nov-2017 16:59:13 UTC] PHP   9. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 16:59:13 UTC] PHP  10. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 16:59:13 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 16:59:13 UTC] PHP Stack trace:
[10-Nov-2017 16:59:13 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 16:59:13 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 16:59:13 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 16:59:13 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 16:59:13 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 16:59:13 UTC] PHP   6. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:59:13 UTC] PHP   7. wp_enqueue_script() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:49
[10-Nov-2017 16:59:13 UTC] PHP   8. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:267
[10-Nov-2017 16:59:13 UTC] PHP   9. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 16:59:13 UTC] PHP  10. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 16:59:13 UTC] PHP Notice:  wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 16:59:13 UTC] PHP Stack trace:
[10-Nov-2017 16:59:13 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 16:59:13 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 16:59:13 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 16:59:13 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 16:59:13 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 16:59:13 UTC] PHP   6. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 16:59:13 UTC] PHP   7. wp_enqueue_style() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:52
[10-Nov-2017 16:59:13 UTC] PHP   8. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-styles.php:165
[10-Nov-2017 16:59:13 UTC] PHP   9. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 16:59:13 UTC] PHP  10. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 16:59:13 UTC] PHP Notice:  Undefined variable: royal_prettyphoto_tab_url in /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php on line 120
[10-Nov-2017 16:59:13 UTC] PHP Stack trace:
[10-Nov-2017 16:59:13 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 16:59:13 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 16:59:13 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 16:59:13 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 16:59:13 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 16:59:13 UTC] PHP   6. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 18:44:16 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; GDLR_Import has a deprecated constructor in /app/public/wp-content/plugins/goodlayers-importer/goodlayers-importer.php on line 28
[10-Nov-2017 18:44:16 UTC] PHP Stack trace:
[10-Nov-2017 18:44:16 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 18:44:16 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 18:44:16 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 18:44:16 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 18:44:16 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 18:44:17 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 18:44:17 UTC] PHP Stack trace:
[10-Nov-2017 18:44:17 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 18:44:17 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 18:44:17 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 18:44:17 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 18:44:17 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 18:44:17 UTC] PHP   6. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 18:44:17 UTC] PHP   7. wp_enqueue_script() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:47
[10-Nov-2017 18:44:17 UTC] PHP   8. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:267
[10-Nov-2017 18:44:17 UTC] PHP   9. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 18:44:17 UTC] PHP  10. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 18:44:17 UTC] PHP Notice:  wp_enqueue_script was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 18:44:17 UTC] PHP Stack trace:
[10-Nov-2017 18:44:17 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 18:44:17 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 18:44:17 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 18:44:17 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 18:44:17 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 18:44:17 UTC] PHP   6. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 18:44:17 UTC] PHP   7. wp_enqueue_script() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:49
[10-Nov-2017 18:44:17 UTC] PHP   8. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:267
[10-Nov-2017 18:44:17 UTC] PHP   9. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 18:44:17 UTC] PHP  10. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 18:44:17 UTC] PHP Notice:  wp_enqueue_style was called <strong>incorrectly</strong>. Scripts and styles should not be registered or enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts</code>, or <code>login_enqueue_scripts</code> hooks. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.3.0.) in /app/public/wp-includes/functions.php on line 4139
[10-Nov-2017 18:44:17 UTC] PHP Stack trace:
[10-Nov-2017 18:44:17 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 18:44:17 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 18:44:17 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 18:44:17 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 18:44:17 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 18:44:17 UTC] PHP   6. include_once() /app/public/wp-settings.php:303
[10-Nov-2017 18:44:17 UTC] PHP   7. wp_enqueue_style() /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php:52
[10-Nov-2017 18:44:17 UTC] PHP   8. _wp_scripts_maybe_doing_it_wrong() /app/public/wp-includes/functions.wp-styles.php:165
[10-Nov-2017 18:44:17 UTC] PHP   9. _doing_it_wrong() /app/public/wp-includes/functions.wp-scripts.php:47
[10-Nov-2017 18:44:17 UTC] PHP  10. trigger_error() /app/public/wp-includes/functions.php:4139
[10-Nov-2017 18:44:17 UTC] PHP Notice:  Undefined variable: royal_prettyphoto_tab_url in /app/public/wp-content/plugins/rt-prettyphoto/rt-prettyphoto.php on line 120
[10-Nov-2017 18:44:17 UTC] PHP Stack trace:
[10-Nov-2017 18:44:17 UTC] PHP   1. {main}() /app/public/index.php:0
[10-Nov-2017 18:44:17 UTC] PHP   2. require() /app/public/index.php:17
[10-Nov-2017 18:44:17 UTC] PHP   3. require_once() /app/public/wp-blog-header.php:13
[10-Nov-2017 18:44:17 UTC] PHP   4. require_once() /app/public/wp-load.php:37
[10-Nov-2017 18:44:17 UTC] PHP   5. require_once() /app/public/wp-config.php:93
[10-Nov-2017 18:44:17 UTC] PHP   6. include_once() /app/public/wp-settings.php:303

Hi @John1966,

It looks like the goodlayers-importer plugin isn’t compatible with PHP 7.0 or PHP 7.1. The first thing you can try is removing that plugin from the site’s app/public/wp-content/plugins folder. If you need that plugin, see the instructions below:


If the site is using the Custom environment, you can change the PHP version on the fly. If you see a dropdown by the PHP version, select PHP 5.6 and then click the button to change the version.


Otherwise, the site is running Preferred. In that case, you can export the site and then re-import it to switch it to the “Custom” environment. Here’s how:

  1. Right-click on the site in Local’s sidebar
  2. Go to Export and follow that flow
  3. Drag-and-drop the exported site archive back onto Local’s window to trigger the import
  4. When going through the import flow, select Custom and PHP 5.6 when prompted in the Environment section

It appears that doing this (selecting php version 5.6), you would lose the ability to use local and flywheel with one click deploy? Any way around this?

Hi @higginni,

All Flywheel sites are running PHP 7.1. We force the same version in Local so you have a seamless experience and don’t see errors like this after you push live to Flywheel.

Why are you needing to downgrade from PHP 7.1? Just asking since there may be a better solution :slight_smile: