使用capistrano部署wordpress站点

使用capistrano部署wordpress站点,wordpress,Wordpress,我正在尝试使用capistrano部署wordpress站点。这是我的deploy.rb文件 # config valid only for current version of Capistrano lock "3.11.0" set :deploy_to, "/home/#{fetch(:deploy_user)}/#{fetch(:application)}" set :ssh_options, { forward_agent: true, } set :pty, true

我正在尝试使用capistrano部署wordpress站点。这是我的deploy.rb文件

# config valid only for current version of Capistrano
lock "3.11.0"

set :deploy_to, "/home/#{fetch(:deploy_user)}/#{fetch(:application)}"


set :ssh_options, {
  forward_agent: true,
}


set :pty, true


set :keep_releases, 5


set :linked_files, %w{wp-activate.php wp-blog-header.php wp-comments-post.php wp-config.php wp-cron.php wp-links-opml.php wp-load.php wp-login.php wp-mail.php wp-settings.php wp-signup.php wp-trackback.php xmlrpc.php wp-content/index.php wp-content/themes/index.php index.php .htaccess}


set :linked_dirs, fetch(:linked_dirs, []).push('wp-content/plugins','wp-content/uploads','wp-admin','wp-includes','wp-content/upgrade','wp-content/themes/twentyfifteen','wp-content/themes/twentysixteen','wp-content/themes/twentyseventeen')
除了上传主题时将其放在/shared/wp content/themes文件夹中,而不是当前的/wp content/themes文件夹中之外,所有内容似乎都正常工作

我的apachevhost文件设置如下

<Directory /home/user/app/current/>
        Options Indexes FollowSymLinks
        AllowOverride All
    Require all granted
</Directory>

选项索引跟随符号链接
允许超越所有
要求所有授权
它从哪里得到路径

阅读说明

无法移动主题文件夹,因为其路径是相对于wp content文件夹硬编码的:


它似乎是从app/shared而不是app/current获取wp内容文件夹。app/current中的一个不是app/shared中的一个的符号链接

重新运行wordpress安装脚本。现在可以了