-
Make sure you have the latest version of WP-CLI installed, and that
which wp
points to it.- If your host has old versions of Git, WP-CLI, etc installed globally, then you may need to install the latest versions into your
~/bin
directory andexport PATH="$HOME/bin:$PATH"
- If your host has old versions of Git, WP-CLI, etc installed globally, then you may need to install the latest versions into your
-
If you're using CloudFlare, make sure you have Regolith's deployment configuration setup to connect to the origin IP directly, instead of being proxied through CloudFlare. CloudFlare blocks SSH, so you won't be able to deploy through their proxy.
- If you've setup page rules to cache dynamic content, then temporarily turn on
Development Mode
to bypass the cache.
- If you've setup page rules to cache dynamic content, then temporarily turn on
-
If you're having trouble cloning Git repos during deployment:
- Make sure you can connect via SSH, e.g.
ssh -vvv [email protected]
. - Some hosts block port
22
to GitLab and other platforms, etc. That StackOverflow thread has a solution, by using port443
instead. That is specific to GitLab, though. Other repository hosts might not work, or might need a different solution. - If you're still having trouble after verifying that you can connect with SSH, try creating a deploy key specifically for the repo and production server.
- Make sure the key only has
read
access to the specific repository you need to clone, not all repositories, and notwrite
access. - DO NOT UPLOAD YOUR PRIVATE SSH KEY TO THE PRODUCTION SERVER. That would be akin to uploading a plain-text file with all your passwords in it.
- Make sure the key only has
- Make sure you can connect via SSH, e.g.
-
If WordFence says that the WAF still needs to be configured, even though you've setup
auto_prepend_file
, your host may not support.user.ini
files. These changes are necessary on SiteGround, and may be helpful for other hosts:- Change
.user.ini
tophp.ini
everywhere - Copy
/usr/local/php72/lib/php.ini
to~/website/shared/web/php.ini
, and customize theauto_prepend_file
directive.- Simply adding an empty
php.ini
file with theauto_prepend_file
value won't work, and will cause WP Admin to send aLocation: http://
header. - You should periodically diff your custom file against the canonical one and merge changes, especially when changing PHP versions.
- Simply adding an empty
- Add the following line to
~/website/shared/web/php.ini
:SetEnv PHPRC /home/username/public_html/php.ini
.- This is necessary in order for the
php.ini
file to apply to subfolders recursively.
- This is necessary in order for the
- Change
-
Search for an existing issue on GitHub, or create a new one.