0
我试图部署一个使用php deployer的Wordpress网站,但是我在共享文件夹中的wp-config.php
文件有问题。Deployer php - 共享文件不起作用
当我部署时,这个不是共享的,我被重定向到/wp-admin/setup-config.php
。
我忘记了我的deploy.php
配置文件中的内容吗?
<?php
namespace Deployer;
require_once __DIR__.'/vendor/deployer/deployer/recipe/common.php';
// CONFIG ///////////////////////////////////////////////////////////////
set('repository', '[email protected]:myrepo/surfblog.git');
set('shared_files', ['wp-config.php']);
set('shared_files', ['wp-content/wp-cache-config.php']);
set('shared_dirs', ['wp-content/uploads']);
set('writable_dirs', ['wp-content/uploads']);
set('keep_releases', 5);
set('default_stage', 'recette');
// HOSTS ///////////////////////////////////////////////////////////////
host('?.??.??.???')
->user('root')
->stage('recette')
->set('deploy_path', '/home/www/surf/blog_test');
localhost()
->stage('localhost')
->set('deploy_path', '/home/kevin/Public/test');
// TASKS ///////////////////////////////////////////////////////////////
task('deploy', [
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:writable',
'deploy:symlink',
'deploy:unlock',
'cleanup',
])->desc('Deploy your project');
after('deploy', 'success');
它适用于我在本地主机中,但不在我的在线服务器上。
我的第一个虽然是检查是否混帐可以从远程主机 –
访问存储库@ mr.void我可以。当我复制过去的'wp-config.php'文件时,该网站就可以正常工作 – Kevin