basilhendroff / truenas-iocage-wordpress

Script to install WordPress in an iocage jail including MariaDB, the PHP scripting language, Caddy, Redis and phpMyAdmin.
GNU General Public License v3.0
6 stars 6 forks source link

php74 is deprecated #22

Open francoisjacques opened 1 year ago

francoisjacques commented 1 year ago

The script needs to be updated.

With these changes, it appears to build fine. Haven't yet tested the end result... but without the changes, I couldn't get any php dependency to install.

francoisjacques commented 1 year ago

Hey @basilhendroff, it seems that some of the downstream forks have done the work and the changes could be integrated somewhat easily. Are you still maintaining this or should the truenas core community switch to one of the forks?

nikbpetrov commented 1 year ago

I've used this fork and it works quite well. It's relatively straightforward to add to the script the ssmtp config and testing that's in the post-installation tasks.

I've also added cleanup funcs based on this script to run the installation, clean up default plugins, remove default content etc.

You can also perhaps secure the phpmyadmin installation too in the script, but I haven't got that far.

Oh - one thing I found missing is setting up the default home and siteurl in the wordpress installation. Seems necessary if you are running wordpress in one jail that's communicating with the reverse proxy jail over http. These few lines have proved very useful to me to add to the /includes/fragment-1.php file (which basically adds them to the top of the wp-config.php upon installation)

if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
  $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}

define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
define('FORCE_SSL_ADMIN', true);