No output from file_get_contents

Hello,
I’m working on a Flywheel site and wondering if file_get_contents is disabled by default because it won’t load anything. I’m guessing warnings/errors are also disabled, so I get zero feedback from PHP about why it’s failing.

Do I need to gain admin access to the server and configure PHP to enable file_get_contents? My task is to load an HTML file and include it with a Wordpress shortcode. The shortcode works for plain strings, but fails silently when I try to load a file from the same directory as the Wordpress theme.

Edit: I should add that this Wordpress plugin does the same thing as my custom solution, and it also fails to include the content silently…hence my assumption that the PHP function needs to be enabled. https://wordpress.org/plugins/wp-file-get-contents/

Thank you

Hi @marcy_deque,

Is the site in Local running the Preferred or Custom environment?

Also, have you tried enabling both WP_DEBUG and WP_DEBUG_LOG in the wp-config.php file?

I’m in a staging environment created by Flywheel. I don’t seem to have permissions to overwrite wp-config.php. This is my first time working with Flywheel; do I need to contact someone who signed up for the account or to Flywheel directly to figure out permissions? I’m used to working on Wordpress sites with full server access.

Aha, sorry for the confusion!

These forums are for Local by Flywheel, our local development solution. To get help with our hosting, please visit https://app.getflywheel.com/contact.