I just set up a fresh WordPress installation with the bedrock project, works on local.
On first deploy on production, the website is shown and works properly.
If I ran again cap production deploy
, I get a blank page with absolutely no error.
This blank page is replaced by the correct website after few minutes.
After a lot of search, I was supposing the opcache fault. So I disable it, restarted Apache and checked if really disabled (it was). But nothing change, always a blank page without error after a deployment action.
Here my deploy.rb file:
set :application, 'my-project'
set :repo_url, 'git@git.example.com:my/my-project.git'
set :branch, :master
set :log_level, :info
set :linked_files, fetch(:linked_files, []).push('.env', 'web/robots.txt')
set :linked_dirs, fetch(:linked_dirs, []).push('web/app/uploads')
set :file_permissions_paths, ["web/app/uploads"]
set :file_permissions_users, ["www-data"]
before "deploy:updated", "deploy:set_permissions:acl"
namespace :deploy do
end
And my production.php config file (nothing changed on application.php):
<?php
/* Production */
define('DB_NAME', getenv('DB_NAME'));
define('DB_USER', getenv('DB_USER'));
define('DB_PASSWORD', getenv('DB_PASSWORD'));
define('DB_HOST', getenv('DB_HOST') ? getenv('DB_HOST') : 'localhost');
define('WP_HOME', getenv('WP_HOME'));
define('WP_SITEURL', getenv('WP_SITEURL'));
ini_set('display_errors', 0);
define('WP_DEBUG_DISPLAY', false);
define('SCRIPT_DEBUG', false);
define('DISALLOW_FILE_MODS', !$is_wp_cli); // this disables all file modifications including updates and update notifications
Obviously, I tried many Apache restart/reload just after the deploy. But it doesn’t affect anything.
Without error, it’s quite difficult to point the problem source.
Anybody having the same issue? How to solve it?
Thanks.