nickkadutskyi/wp-skeleton

安装: 11

依赖: 0

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

语言:Nix

类型:项目

1.0.10 2024-08-09 02:46 UTC

This package is auto-updated.

Last update: 2024-09-18 07:26:28 UTC


README

WordPress网站的启动项目

  • Symfony仅因其 密钥管理功能 而被使用
  • WordPress核心文件始终与wp-content和插件分离,并由WP-CLI管理

初始化

# Creates Symfony Vault encription key and sets WP salts for prod and local
scripts/initial.sh

开发

# Install the project
composer install

# Install all submodules (if exist)
git submodule update --init --recursive

# Runs installation script (basically downloads WordPress core files of the version specified in wp-cli.yml)
scripts/wp-install.sh

更新

# 1. Updates to the latest version (provide any wp core update options to modify update process)
scripts/wp-update.sh

# 2. If updated wp-cli.yml will be updated to with the newer version for install.sh script to consider.

# 3. Commit changes

生产

这大约是如何在生产环境中更新项目的。它应该已经有生产解密密钥,以便从生产保险库中提取所有密钥

# Assuming that the project is already on production and you want to update it
git pull origin main

# Updating submodules
git submodule update --init --recursive

# Deleting local env extracted before because it might interfere with the further extraction
rm .env.prod.local

# Sets up environtment
export APP_ENV=prod

# Bring the project to the current state according to composer.lock
composer install --no-dev --optimize-autoloader

# Extracts secrets from production vault
APP_RUNTIME_ENV=prod php bin/console secrets:decrypt-to-local --force

# Converts env file to a single php file (.env.local.php) for performance
composer dump-env prod

# Clears Symfony cache (if you don't use anything from Symfony then don't need to do this)
APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear

# Runs installation script (basically downloads WordPress corse file of the version specified in wp-cli.yml)
scripts/install.sh

# Sets symlink for the wp-content folder to be accessible from the web
ln -s /path/to/the/project/src/WordPressContent /path/to/the/project/public-wp/content

# Sets ownership to your user and to give access to server (www-data group), change if server group is different.
sudo chown -R your-user-here:www-data ./*

# Restarts apache, or change it to restart a different type of server
sudo service apache2 restart