which php.ini file should i edit for 64mb uploads in wordpress docker reddit / selfhosted ---------------------------------------------------------------------- ProKn1fe · 2023-10-20 20:00 Most likely second if you run php in fpm mode. ---------------------------------------------------------------------- ComputersWantMeDead · 2023-10-20 20:36 This is probably not relevant to your case, but in many cases with shared files, there is one master with others as symbolic links. If you use find instead of locate, you can specify the "-type f" switch to exclude the symbolic links ---------------------------------------------------------------------- ruffcodes · 2023-10-20 20:42 So i configured it for the second one, it still gives the error ---------------------------------------------------------------------- ZaxLofful · 2023-10-20 21:08 Did you set the value for Wordpress as well? ---------------------------------------------------------------------- madroots2 · 2023-10-20 21:14 You can also spawn php info file and it will tell you which one is being used ---------------------------------------------------------------------- micalm · 2023-10-20 21:24 If that's a screenshot from your docker host, none. Your wordpress docker image uses it's own config file, which may or may not be easily reconfigurable. Check the documentation. ---------------------------------------------------------------------- ArtooDetoo89 · 2023-10-20 21:28 Did you restart your web server? ---------------------------------------------------------------------- Ariquitaun · 2023-10-20 21:46 The webserver also needs a reciprocal setting ---------------------------------------------------------------------- Tuffelluff · 2023-10-20 22:01 Check the loaded config files via phpinfo() ---------------------------------------------------------------------- knifesk · 2023-10-20 22:05 I wouldn't use WordPress. It's a massive security risk for any infrastructure it's running on. In the past, every client I had who used WordPress got hacked. Even the ones that used no plugins or themes ---------------------------------------------------------------------- Independent_Till5832 · 2023-10-20 22:30 Lol, if you use the most recent WordPress without any plugins or themes, and still get hacked the issue lies somewhere else.. Since 80 % of websites running WordPress, and if people could easily hack all of them, there would be botets in almost unimaginable size ---------------------------------------------------------------------- Massive_Analyst1011 · 2023-10-20 22:48 Just rename php.ini.production to php.ini and change the value there. ---------------------------------------------------------------------- llevii · 2023-10-20 23:00 Try cli command: php --ini ---------------------------------------------------------------------- haroldp · 2023-10-21 00:02 Best answer. ---------------------------------------------------------------------- neonsphinx · 2023-10-21 00:22 Holy shit, I think I just figured this out and wrote a blog post about it. Are you using WordPress, mariadb, and phpnyadmin in docker (or on bare metal)? Are you also using nginx? Nginx by default only allows 1MB uploads. But it's super easy to change. https://fitib.us/2023/10/11/the-whole-secret-lies-in-confusing-the- enemy-so-that-he-cannot-fathom-our-real-intent/ ---------------------------------------------------------------------- devkareem · 2023-10-21 01:13 The file is indeed correct. You need to restart php8.1-fpm to apply changes as it's a separate service. $ systemctl restart php8.1-fpm ---------------------------------------------------------------------- whatthetoken · 2023-10-21 02:35 Yup. And make sure you check via the web server request and not from cli as they're not guaranteed to be loaded the same way ---------------------------------------------------------------------- jacky9813 · 2023-10-21 04:56 CLI will only load CLI config file. Unless PHP is running in pure CGI mode, which in most cases isn't and shouldn't for security reasons, it is different to the actual servicing config file. As OP shown, it is most likely running on FastCGI mode, which should load the fpm config file. ---------------------------------------------------------------------- ruffcodes · 2023-10-21 05:56 yes i did ---------------------------------------------------------------------- ruffcodes · 2023-10-21 05:59 so it told me its using the cli file, can you please telll what fields should i edit, i believe i am going wrong there only ---------------------------------------------------------------------- ruffcodes · 2023-10-21 06:03 i am hosting this on my raspberry pi, where can i find the docker config file ---------------------------------------------------------------------- ruffcodes · 2023-10-21 06:08 where can i do that ---------------------------------------------------------------------- ruffcodes · 2023-10-21 06:10 i use cloudflare as well, idk how much that helps but ye, also this is a simple school website ---------------------------------------------------------------------- ZaxLofful · 2023-10-21 06:13 https://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum- file-upload-size-in-wordpress/ ---------------------------------------------------------------------- KervyN · 2023-10-21 08:46 Might give the image url, so we can tell. ---------------------------------------------------------------------- nikimere · 2023-10-21 09:14 You need to change the upload_max_filesize and post_max_size directives in your INI file. Make sure you restart your web server after. ---------------------------------------------------------------------- JakeSully-Navi · 2023-10-21 10:37 Edit both cli and fpm ones. Then restart apache and php. ---------------------------------------------------------------------- D0ublek1ll · 2023-10-21 14:25 Id expect fpm/php.ini ---------------------------------------------------------------------- CodebySven · 2023-10-21 17:45 WordPress is the most used CMS, if you just update when there is a WP update, if your are using docker with Watch Tower it should be save to use. And there are indeed plenty of alternatives available but because WP is so big is the chance that WP is safer to use much more likely... ---------------------------------------------------------------------- DWolfUK40 · 2023-10-21 20:03 This. Call it in a php file on your web server through a browser and it will give you all the info you need :)