# Several PHP settings do not reflect on my WordPress installation

**URL:** <https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259>\
**Category:** Virtualmin\
**Created:** [December 19, 2022, 9:42am UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259 "2022-12-19T09:42:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mustafamohsen](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/mustafamohsen/32/7567_2.png) [@mustafamohsen](https://forum.virtualmin.com/u/mustafamohsen)\
**Post date:** [December 19, 2022, 9:42am UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/1 "2022-12-19T09:42:51Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Ubuntu 20.04 LTS |
| Webmin version | 2.010 |
| Virtualmin version | 7 |
| Related packages | SUGGESTED |

In Virtualmin, for one host I set some PHP variables (`upload_max_filesize=500M` and a few others), PHP script execution mode (FPM), and PHP version (7.4.33) from **Server Configuration → PHP Options**

Yet, when I check my WordPress site health info I find different settings. Just for example, max upload file size is 2M, as well as other variables. One notable thing is that it shows that Wordpress folder is not writable, even though it’s permission is 750, and the process (supposedly) run with the permissions of the same user. When I `chmod g+w` it’s writable. So obviously the server runs under a different user

What could be the problem? How can I fix it?

---

<div class="post-metadata">

**Author:** ![Gomez\_Adams](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gomez_adams/32/3221_2.png) [@Gomez\_Adams](https://forum.virtualmin.com/u/Gomez_Adams)\
**Post date:** [December 19, 2022, 11:57am UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/2 "2022-12-19T11:57:54Z")

</div>

Did you restart the services after you made the changes?

---

<div class="post-metadata">

**Author:** ![RJM\_Web\_Design](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/rjm_web_design/32/1457_2.png) [@RJM\_Web\_Design](https://forum.virtualmin.com/u/RJM_Web_Design)\
**Post date:** [December 19, 2022, 1:12pm UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/3 "2022-12-19T13:12:10Z")

</div>

At a minimum, you have to

- Manually make changes from defaults in the PHP configuration(s) ( `Webmin > Tools > PHP Configuration` ).

- Restart each service and enable the one(s) you want to start at boot ( `Webmin > System > Bootup and Shutdown` ).

That’s usually enough, but in some cases you’ll also have to specify the default CLI version for the system. I don’t know how to do that in Ubuntu, so I will defer on that.

Richard

---

<div class="post-metadata">

**Author:** ![calport](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/calport/32/44_2.png) [@calport](https://forum.virtualmin.com/u/calport)\
**Post date:** [December 19, 2022, 1:25pm UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/4 "2022-12-19T13:25:44Z")

</div>

> [@mustafamohsen](#):
>
> One notable thing is that it shows that Wordpress folder is not writable, even though it’s permission is 750, and the process (supposedly) run with the permissions of the same user. When I `chmod g+w` it’s writable. So obviously the server runs under a different user

I have no idea what you mean by that; in Virtualmin → Limits and Validation → Validate Virtual Servers, the Fix Permissions tab will set / reset the correct user and permissions required per virtual server. If your app complains (WordPress probably won’t) then you can further tweak the permissions. There should never be need for you to change the user.

---

<div class="post-metadata">

**Author:** ![mustafamohsen](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/mustafamohsen/32/7567_2.png) [@mustafamohsen](https://forum.virtualmin.com/u/mustafamohsen)\
**Post date:** [December 19, 2022, 9:05pm UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/5 "2022-12-19T21:05:06Z")

</div>

Running the server validation shows that it’s all good  
Now I noticed something. I tried `<?php echo exec('whoami')/ ?>`, which oddly outputed `www-data` rather than the designated user, which is set in **Services-\>Configure Website-\>Users & Groups**. How comes? And how should I fix that?

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [December 19, 2022, 10:29pm UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/6 "2022-12-19T22:29:01Z")

</div>

> [@mustafamohsen](#):
>
> I tried `<?php echo exec('whoami')/ ?>`, which oddly outputed `www-data` rather than the designated user,

You’ve installed mod\_php. You should not have.

---

<div class="post-metadata">

**Author:** ![mustafamohsen](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/mustafamohsen/32/7567_2.png) [@mustafamohsen](https://forum.virtualmin.com/u/mustafamohsen)\
**Post date:** [December 20, 2022, 10:54am UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/7 "2022-12-20T10:54:50Z")

</div>

Isn’t it disabled here?

 ![SCR-20221220-hsh](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/c368fc17df553b8df27249d6025bc8c4456f72c5.png)

---

<div class="post-metadata">

**Author:** ![mustafamohsen](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/mustafamohsen/32/7567_2.png) [@mustafamohsen](https://forum.virtualmin.com/u/mustafamohsen)\
**Post date:** [December 20, 2022, 10:55am UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/8 "2022-12-20T10:55:23Z")

</div>

Now I found in phpinfo that it loads the global php info rather than the virtual server’s one. How do I fix that?

 ![SCR-20221220-hx4](https://cdn.forum.virtualmin.com/uploads/default/original/2X/3/35387ae4cfe56d31a9eaa630d7ae6c8d328c1a36.png)

---

<div class="post-metadata">

**Author:** ![Gomez\_Adams](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gomez_adams/32/3221_2.png) [@Gomez\_Adams](https://forum.virtualmin.com/u/Gomez_Adams)\
**Post date:** [December 20, 2022, 10:59am UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/9 "2022-12-20T10:59:27Z")

</div>

I believe that’s part of the chaos that mod php creates and why it should never, ever be installed.

I only know of two ways to fix it, so you might want to wait and see if someone else weighs in with a better solution.

Option 1: obliterate the server and start over.

Option 2: go to your file manager to top level, search for php.ini and change the values in every single one of them. You’ll probably have 6 or 8 different ones at least, located in different places. Change the values to what you want in all of them, then restart your services.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [December 20, 2022, 4:09pm UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/10 "2022-12-20T16:09:28Z")

</div>

> [@mustafamohsen](#):
>
> Now I found in phpinfo that it loads the global php info rather than the virtual server’s one. How do I fix that?

The same answer. You installed mod\_php, and should not have.

Uninstall mod\_php. It is usually in a package called just `php` or `phpVERSION-php`.

There is no reason to have mod\_php installed. Literally none. Just uninstall it and don’t install it again, and this thread stops being complicated.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [February 18, 2023, 4:09pm UTC](https://forum.virtualmin.com/t/several-php-settings-do-not-reflect-on-my-wordpress-installation/118259/11 "2023-02-18T16:09:42Z")

</div>

Closed on February 18, 2023, 4:09pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
