For a WordPress site on Virtualmin, where can I edit WP-memory limit inside Virtualmin?

SYSTEM INFORMATION
OS type and version Ubuntu 22
Webmin version 2.105
Virtualmin version 7.9.0
Related packages WordPress

I tried to use File Manager, I edited in wp-config.php and added define( ‘WP_MEMORY_LIMIT’, ’256M’); before the line of That’s all, stop editing! Happy publishing.

Then my site will have the error of http 500 error, I looked at php error log and found something like there is syntax error in Line 96 of wp-config.php file.
I have to remove the added script.
So, where can I edit WP-memory limit inside Virtualmin?

Thanks!

Change debug to true.

With VM edit resource limits

Simple: You used curly quotes instead of straight ones. Change to the latter and see if it works…

What do you mean by straight ones?

Hi, from the screenshot, I see Maximum memory allocation, is this PHP memory limit or WP memory limit?
I suppose these two are different.

I want PHP memory limit to be 512 MB, while WP memory limit to be 256 MB.

You used:

This is correct:

define('WP_MEMORY_LIMIT', '256M');

Thanks! What is the difference between the two?
I cannot see the difference, I used ().

Oh, c’mon… Just compare (or zoom in):

Yours:

define(‘WP_MEMORY_LIMIT’, ’256M’);

Mine:

define('WP_MEMORY_LIMIT', '256M');

See the different colouring? That’s because curly quotes are incorrect. They must not be used in this context.

@lszach The apostrophes are different. See how yours are fancy and the ones from @Steini are straight. I have been bitten by this one before now. Change them to normal ones and you will be fine. I don’t know what you used to create the fancy apostrophes as most text editors should not use these, it is more a thing for microsoft office.

They look like backticks may be wrong though

1 Like

Thanks for your patience

Thanks a lot, didn’t notice this…

I copied it from other people’s website, I’m frustrated that people give so much confusion.

It’s very common for sites to replace quotes (both single and double) with “smart quotes” (:point_left: like that) that are a different, Unicode, character, rather than the ASCII counterparts that are actually recognized by various config file parsers and programming languages. You need to just watch out for it. It happens all the time.

It happens here even, when someone doesn’t wrap it in backticks (`) or triple backticks (```) for a long example containing multiple lines.

Code and config files and logs should be wrapped in those, so they get treated like literal monospace type.

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