I
I
ILoveYAnny2018-05-01 14:22:42
WordPress
ILoveYAnny, 2018-05-01 14:22:42

How to increase memory in Wordpress?

Hello, there is a script that works with a huge number of records in the database. For this project, we rented a VPS with 4GB of RAM.
The script is run from the WP admin and returns an error

E_ERROR Error in file �wp-db.php� at line 1889: Allowed memory size of 268435456 bytes exhausted (tried to allocate 80 bytes)

Tried adding to wp-config:
define('WP_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');

The result does not change... Always Allowed memory size of 268435456 bytes.
In php.ini memory_limit 1024M
Costs apache+nginx
How to show WordPress that memory has changed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
ILoveYAnny, 2018-05-30
@ILoveYAnny

It was in WordPress, it was in one of the PHP files, not in the config, there was a memory_limit, this file is very easy to find by searching for files with the *.php mask

A
aarty20, 2018-05-10
@aarty20

If it’s still relevant, in my experience it’s not the issue here, but the server settings, since the default VP takes exactly the server settings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question