Uodated virtual box, site won't load


#1

Hi,

This is the error that a brand new site throws.

Fatal error: Uncaught Error: Call to undefined function wp() in /app/public/wp-blog-header.php:16 Stack trace: #0 /app/public/index.php(17): require() #1 {main} thrown in /app/public/wp-blog-header.php on line 16

Any idea?

Thanks,
Anthony


#2

Hey @apcimino

That’s odd that the wp() function is inaccessible. When you updated VirtualBox, did you also restart Local, or restart the computer?

You might also try toggling “Faster Docker Volumes” from the “Preferences > Advanced” tab in Local.

You might also creating a new, blank WordPress site, as well as try re-importing the site that is having issues from a backup.

If you still have issues Can you please provide your local-by-flywheel.log file? See
How do I retrieve Local’s log file?” for instructions on how to do so.

Let us know how it goes!

– Ben


#3

Today when I launched the site I got a message than an update was available for the environment. I updated and it took me to a version of the site I previously deleted (same site name). It works so I’m fine with it.


#4

I’m glad you got it sorted out!


#5

Hi,

The issue is not gone. Here are the relevant lines from the log file. This seems to be the highlight:
Error: Strange wp-config.php file: wp-settings.php is not loaded directly.

Any ideas?
Thanks

Dec 18, 2018, 10:05 AM EST - info: [main/docker-router] getRouterContainers()
Dec 18, 2018, 10:05 AM EST - info: [main/docker-router] teardown()
Dec 18, 2018, 10:05 AM EST - info: [main/docker-router] Removing router container 18035963233aa7bc12f1325475a31b994364a62087d7ef8221924ee4012114fd
Dec 18, 2018, 10:05 AM EST - info: [main/docker-router] updateProxyManager()
Dec 18, 2018, 10:05 AM EST - info: [main/docker-router] runContainer()
Dec 18, 2018, 10:05 AM EST - info: [main/docker-router] reconnectNetwork()
Dec 18, 2018, 10:05 AM EST - warn: [main/SiteModel] wpInstalled not returning "installed" 
{ stdout: '',
  stderr: 'Error: Strange wp-config.php file: wp-settings.php is not loaded directly.' }
Dec 18, 2018, 10:05 AM EST - warn: [main/SiteModel] wpInstalled not returning "installed" 
{ stdout: '',
  stderr: 'Error: Strange wp-config.php file: wp-settings.php is not loaded directly.' }

#6

That sounds like there’s an issue with the wp-config.php file.

Do you have any custom code running within that file?

Are you using any plugins or themes that are trying to load WordPress in an unusual way?

If you want to post the wp-config.php file that is being used, we can take a look and see if anything stands out to us.

– Ben


#7

This is a fresh install. Nothing has been modified at all.


#8

The wp-config.php file is 0 bytes. So it’s been heavily modified :grinning:

Any ideas why it would write out a 0 bytes version?


#9

@apcimino

That’s all very weird. I know this is an old thread, but did an upgrade to the most recent Local help?

The only thing that I could think of is that something with the filesystem mounts was not working correctly.

If you are still having issues, can you let us know a little more about your setup:

  • What version of Local are you using?
  • What OS are you using?
  • Can you please provide your local-by-flywheel.log file? See
    How do I retrieve Local’s log file?” for instructions on how to do so.

– Ben


#10

Hi,

I tried to start up a new site and ran into the same problem.

  • Local v 3.0.4

  • Mac OS 10.14.3

  • log file attached.

Any ideas?

local-by-flywheel.log (477 KB)


#11

I just deleted local, removed all of the sites and re-installed.
Issue still exists.
Local site prints out:
Fatal error: Uncaught Error: Call to undefined function wp() in /app/public/wp-blog-header.php:16 Stack trace: #0 /app/public/index.php(17): require() #1 {main} thrown in /app/public/wp-blog-header.php on line 16

and wp-config is 0 bytes


#12

By turning off “faster docker volumes” I can now create a new site.
Once the site is created I can turn “faster docker volumes” back on and it works fine.


#13

That’s good to know @apcimino – I’m glad you got it working!

The only thing I can think of is that there was an issue with the site folder being mounted within the Virtual Machine and that toggling Faster Docker Volumes refreshed those mounts.

Let us know if you have any other questions!

– Ben