5

I am working on a project that uses blade templating for a custom wordpress website. The website is hosted on wpengine - which has lots of limitations and prevents from creating files / writing files on the fly which is required by the blade templating engine, no command line access, etc.

My temporary course of action to get new features deployed, was simply to ftp the cache files from my local environment to the server, however, doing so result in the following errors, which ignore the cache files on the server and attempt to reference cache files that no longer exist:

Warning: file_put_contents(/nas/content/live/mypath/wp-content/plugins/pluginname/Classes/Controllers/../../views/cache/e44b26a14bd95cd0cdf764d863a0b4bd1848c8ba.php): failed to open stream: Permission denied in /opt/nas/www/common/production/php_prevent_flock.php on line 33

Warning: include(/nas/content/live/mypath/wp-content/plugins/pluginname/Classes/Controllers/../../views/cache/e44b26a14bd95cd0cdf764d863a0b4bd1848c8ba.php): failed to open stream: No such file or directory in /nas/content/live/mypath/wp-content/plugins/pluginname/vendor/illuminate/view/Engines/PhpEngine.php on line 43

Warning: include(): Failed opening '/nas/content/live/mypath/wp-content/plugins/pluginname/Classes/Controllers/../../views/cache/e44b26a14bd95cd0cdf764d863a0b4bd1848c8ba.php' for inclusion (include_path='.:/usr/share/php') in /nas/content/live/mypath/wp-content/plugins/pluginname/vendor/illuminate/view/Engines/PhpEngine.php on line 43

Note, I don't have access to: /opt/nas/www/common/production/php_prevent_flock.php

Was wondering why blade is looking to reference old cache files? How can I prevent this? Is there an easier way to deploy new blade templates despite wpengine limitations?

AnchovyLegend
  • 12,139
  • 38
  • 147
  • 231

1 Answers1

4

I also had this problem , the solution was very simple , just change the path of the cache folder, keep its path as

/tmp/cache

this is because Wpengine allows caches to be stored in tmp folder that should be placed at the root

aneet
  • 41
  • 2
  • Worth noting here that using Themosis I had to programmatically create the /tmp/cache/views folder to get this to work but kudos for the fix! – simnom Dec 18 '18 at 21:33