Scripted WordPress Installation (for Reverse Proxy)

Scripted WordPress Installation (for Reverse Proxy) 2.3.5

molasseking

Cadet
Joined
Dec 10, 2016
Messages
1
Hi,
great effort. Unfortunately I'm not able to complete the installation. Configuration of installation file wordpress-config as described. The scripts runs without problems until the Wordpress is dowloaded_

Wordpress download...





/tmp/latest.tar.gz 14 MB 2903 kBps 06s
wordpress/wp-content/themes/twentytwentyone/assets/css/ie-editor.css: Write failed
wordpress/wp-content/themes/twentytwentyone/assets/css/custom-color-overrides.css: Write to restore size failed
wordpress/wp-content/themes/twentytwentyone/assets/css/style-editor-customizer.css: Write to restore size failed
wordpress/wp-content/themes/twentytwentyone/assets/css/print.css: Write to restore size failed

This failure goes on until:

wordpress/wp-admin/js/set-post-thumbnail.js: Write to restore size failed
wordpress/wp-admin/options-permalink.php: Write to restore size failed
wordpress/wp-admin/widgets.php: Write to restore size failed
wordpress/wp-admin/setup-config.php: Write to restore size failed
wordpress/wp-admin/install.php: Write to restore size failed
wordpress/wp-admin/admin-header.php: Write to restore size failed
wordpress/wp-admin/post-new.php: Write to restore size failed
wordpress/wp-admin/themes.php: Write to restore size failed
wordpress/wp-admin/options-reading.php: Write to restore size failed
wordpress/wp-trackback.php: Write to restore size failed
wordpress/wp-comments-post.php: Write to restore size failed

tar: Error exit delayed from previous errors.

Command: tar xzf /tmp/latest.tar.gz -C /usr/local/www/ failed!


Failed to extract WordPress

Failed to extract WordPress


Script done, output file is wordpress.log

which lets the script stop. Jail is build as expected.

This is the content of my logfile:
Script started on Thu Dec 31 22:21:55 2020

Command: ./wordpress-jail.sh

^[[1;32mGeneral configuration...^[[0m

^[[1;32mInput/Config Sanity checks...^[[0m

^[[1;32mJAIL_INTERFACES defaulting to: vnet0:bridge0^[[0m


^[[1;32mPOOL_PATH defaulting to /mnt/Stargerderzehn_Raid^[[0m

ls: /mnt/tank/apps/wordpress/praxis/files: No such file or directory

ls: /mnt/tank/apps/wordpress/praxis/db: No such file or directory

^[[1;32mJail Creation. Time for a cuppa. Installing packages will take a while.>

praxis successfully created!


As you can see, the scripts starts correct (my jail is named 'praxis') What did I do wrong?? Any suggestions. Tried this for several times, always the same behavior. Im running an uptodate Truenas configuration with a functional Nextcloud and a reverse proxy (I use a modification described by Samuel Dowling - wich works like charm (so no caddy...)
 
Joined
Jan 4, 2014
Messages
1,644
^[[1;32mPOOL_PATH defaulting to /mnt/Stargerderzehn_Raid^[[0m

ls: /mnt/tank/apps/wordpress/praxis/files: No such file or directory

ls: /mnt/tank/apps/wordpress/praxis/db: No such file or directory

If your POOL_PATH is /mnt/Stargerderzehn_Raid, this should be reflected in FILES_PATH and DB_PATH so in your wordpress-config set:

Code:
FILES_PATH="/mnt/Stargerderzehn_Raid/apps/wordpress/praxis/files"
DB_PATH="/mnt/Stargerderzehn_Raid/apps/wordpress/praxis/db"

Note that this is not the default behaviour, but is only required if you are planning on setting up more than one WordPress jail. If you only ever intend to set up a single WordPress jail, I suggest that you remove FILES_PATH and DB_PATH from your wordpress-config. The script will use the default locations:

Code:
FILES_PATH="/mnt/Stargerderzehn_Raid/apps/wordpress/files"
DB_PATH="/mnt/Stargerderzehn_Raid/apps/wordpress/db"

The addition of FILES_PATH and DB_PATH give you a lot of flexibility in where you can place the WordPress files and database e.g. you can have them on a second pool or have the WordPress root at the top of a pool e.g. /mnt/Stargerderzehn_Raid/praxis. Just be aware that these variables are still dependent on a valid pool path.
 
Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Scripted WordPress Installation (for Reverse Proxy) with a new update entry:

Caddy 2.3.0 released plus script improvements

1. A Caddy web server serves the PHP files in the WordPress jail. Caddy has been upgraded from 2.2.1 to 2.3.0.

To update your WordPress jail, assuming the jail is named wordpress, enter the jail iocage console wordpress and update Caddy:

Code:
cd /usr/local/bin
fetch https://github.com/caddyserver/caddy/releases/download/caddy_2.3.0_freebsd_amd64.tar.gz
caddy version #2.2.1
service caddy stop
mv caddy caddy_2.2.1
tar xvf caddy_2.3.0_freebsd_amd64.tar.gz...

Read the rest of this update entry...
 
Joined
Jan 4, 2014
Messages
1,644
@molasseking Please download the latest script. It uses Caddy 2.3.0, which was released overnight. In addition, based on my observations on your valiant attempts to use the previous script version, I've replaced config variables FILES_PATH and DB_PATH with a single variable WP_ROOT. This should make setting up wordpress-config clearer. Please refer to the latest README for installation instructions. Good luck. Let me know if you have any problems using the revised script.
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
Joined
Jan 4, 2014
Messages
1,644
I've recently migrated critical server infrastructure from FreeNAS 11.3-U5 to TrueNAS 12.0-U3. I'm in the process of upgrading all jails from FreeBSD 11.3 to 12.2.

If you've used this resource to build WordPress jails, upgrading the jail FreeBSD version is likely to break underlying SSMTP functionality. To restore this, execute the following commands within the jail:
Code:
chown ssmtp:wheel /usr/local/etc/ssmtp
chmod 4750 /usr/local/etc/ssmtp
chown ssmtp:nogroup /usr/local/sbin/ssmtp
chmod 4555 /usr/local/sbin/ssmtp
 
Last edited:
Joined
Jan 4, 2014
Messages
1,644
Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Scripted WordPress Installation (for Reverse Proxy) with a new update entry:

Caddy now using more package defaults.

Refer to the 2.3.3 changelog for details.

To update your existing WordPress jails, run the following commands within the jail:
Code:
sed -i '' "s|/var/log/access.log|/var/log/caddy/access.log|" /usr/local/www/Caddyfile
sed -i '' "s|validate|configtest|" /usr/local/etc/rc.d/caddy
sysrc -x caddy_logdir
service caddy restart

Read the rest of this update entry...
 
Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Scripted WordPress Installation (for Reverse Proxy) with a new update entry:

Backup of password text file

The password text file located in /root contains the WordPress site administrator password for MariaDB. With this update, the installation script backs the password file up to the WordPress site root.

If you've used a previous version of this script, you may need to take action. Consider the following scenario:

You regularly back up the datasets for your WordPress sites, but you haven't backed up the password files in /root. If you lose the system, you may be...

Read the rest of this update entry...
 
Joined
Jan 4, 2014
Messages
1,644
Basil Hendroff updated Scripted WordPress Installation (for Reverse Proxy) with a new update entry:

Caddy webserver improvements

Update the Caddy webserver to:

  1. Use ISO 8601 time-stamping for logging.
  2. Harden WordPress
  3. Mitigate spam attacks on WordPress
Refer to the Caddyfile at https://github.com/basilhendroff/truenas-iocage-wordpress/blob/master/includes/Caddyfile for the latest changes. If you've used an earlier version of the WordPress script and would like to take advantage of these improvements, reflect any changes in /usr/local/www/Caddyfile in your WordPress jail.

Read the rest of this update entry...
 

itsryan

Dabbler
Joined
Jan 11, 2017
Messages
20
So I'm running into a head scratcher I installed this the first time and everything worked for over a month. I decided to to a pkg update in the jail and everything broke.
Since then I have deleted the jails and all files a few times. Every time I run the script the the install completes but the problem is wp-cron won't work. Nothing can be scheduled.
As far as I know nothing has changed with the reverse proxy since that's in a different jail.
After a few hours of searching the only info I can find it something to do with the reverse proxy to cloudflare won't allow it as the website is on the server in http while cloudflare is sending evething to https.

This I have tried.
Fully delete jail and all wordpress files.
Tried to manually setup cron on truenas and configur it to WordPress.
Changed php settings

The only this that's different from my setup to the scripts is in my reverse proxy jail. It says to set it up as cloud.DOMAIN.com.conf but I have mine DOMAIN.com.conf. cloud is going to my nextcloud jail and I have another jail as well.

Any ideas what's causing wordpress cron/scheduled to stop working.
 

victort

Guru
Joined
Dec 31, 2021
Messages
951
Is this still maintained.
Having issues with the install.

The post-install instructions on the GitHub are different than the blog.

For example the force_ssl_admin instructions.

Which ones are the most up to date?
 

victort

Guru
Joined
Dec 31, 2021
Messages
951
Is this still maintained.
Having issues with the install.

The post-install instructions on the GitHub are different than the blog.

For example the force_ssl_admin instructions.

Which ones are the most up to date?
I’m assuming all the config and admin stuff is done using http because I can’t get anywhere when trying to do anything using https.

Login portal isn’t formatted properly, and I can’t access the login page settings after entering my site login info. The screen stays blank.

I enter my login info, get a warning about the form being insecure, then an http error.
 
Last edited:
Top