I want to use the wordpress app, but in order to do that I need to be able to change the max size regarding files to upload in wordpress. Typically that is done by changing the php settings post_max_size and upload_max_filesize. I have not found any way to do that so I really need help with this. If its not possible to change this I need to install a vm with os, webbserver and wordpress which seems quite an overkill when everything already is on the truenas scale.
(i need to import a backup of my current wordpress installation of 30GB from my old installation in order to install it on truenas)
I have also tried the different wordpress tools that makes it possible to change the upload size but it does not work.
I never found a solution, installed a vm with ubuntu and installed wordpress and apache instead. Its an overkill solution for this though. Would very much like to run it through the app though so I would also like to see a solution to this
Hmm, that is overkill. I canât say this is any better than deploying WordPress to existing shared directories for content. i can now access it through SMB, to upload my larger files, but stillâŚ
I donât think this is the ideal solution that you are looking for but for me it worked to upload overwrite the limit and upload a bigger file. I found this solution googling âdocker wordpress max file limitâ:
Look for this on Youtube " Docker: Increase maximum Wordpress upload file size "
(all credits for the channel TechGuideReview)
It is really easy. In a nutshell, you just need to:
Go to Truenas Apps, click on Wordpress, click on the Terminal icon and write /bin/bash (/bin/sh is by default but i like bash better)
In the terminal, you will be in this path: /var/www/html
Type: ls -a (to show the hidden files, there will be one called â.htaccessâ).
Type: cat .htaccess (to see the content of the file)
Type: sed -i â/^# END WordPress.*/i php_value upload_max_filesize 256M\nphp_value post_max_size 256Mâ .htaccess
Type: cat. htaccess (to check if the line was added correctly.
Hi and thanks for the idea, think it would work for me. However, Im trying but cant make sed affect the file, nothing happens with the file when trying. The date/time of the file is updated but the content isnt there. I couldnt get your line to work so i tried
sed -i â/# END Wordpress.*/i php_value upload_max_filesize 256M\nphp_value post_max_size 256Mâ .htaccess
It seems as if the change is overwritten again with the original as it states in the remarks
The directives (lines) between âBEGIN WordPressâ and âEND WordPressâ are
dynamically generated, and should only be modified via WordPress filters.
Any changes to the directives between these markers will be overwritten.
I forgot to mention that i tried that on the TrueNAS-24.10-RC.2 (electric eel), that is using docker to run the apps. It could have some influence.
In regards to providing more tips, I donât think I can provide anything better. I donât have a deeper understanding about the issue. I can only suggest to look on forums related to docker and php if you donât find the answer here. I donât think it is something intrinsic to truenas but understanding the underlying technologies.
I have the same issue but I have the solution!" Personally, I prefer an SSH connection, but you can also use the WordPress terminal (/bin/bash) to access your WordPress files directly. If you want to go with your SSH connection, navigate to /mnt/.ixapps/app_mounts.wordpress/data.
Run the command: ls -a
The file .htaccess should appear.
Then use the command: sudo nano .htaccess
Write the following code after the existing content in your .htaccess file:
Hi, and thanks. Im running Dragonfish-24.04.2 and I cant get that solution to work. Dont have nano in the bash and when trying to add the text with sed i get error from rewritecond. Which version are you running?
Iâm currently using ElectricEel-24.10.0.2. Try to set up an SSH connection between your NAS and your computer. Here are the steps based on your operating system:
Linux Computer:
Open your terminal.
Try to connect to your NAS with the following command line, replacing <your_port> with your custom port if youâre not using the default (22) port:
ssh -p <your_port> admin@nas_ip
Enter your password when prompted.
Windows Computer:
I recommend using PuTTY to set up your SSH connection.
Configure your session with the following settings:
Host Name (or IP address): nas_ip
Port: <your_port> (replace if youâre not using the default 22 port)
Connection: SSH
You should have access to nano on PuTTY, although I couldnât confirm this as Iâm using Linux.
Hi and thanks again. I already have ssh and putty so thats not the problem. It seems as if there are other things that differ between electric eel and dragonfish. It might be that the problem can be solved when i eventually upgrade to electriceel but that is something i need to wait for (nano and other editors are not available, but sed are)
Please verify the path you chose. If what your wrote is accurate, ignoring the double slashes, you likely made a folder on the boot pool which wonât survive an update.