Questions tagged [memory]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
64
votes
8answers
6k views

Refactoring Wordpress to improve memory performance [closed]

I had a close look at Wordpress memory consumption. On my site, it seems that for each page hit 20MB of RAM gets allocated, just to prepare comfy environment for all the plugins to run in. I plotted ...
12
votes
1answer
1k views

How to configure WordPress to handle 75,000 pages?

I have a large site that's using WordPress. We have 75,000 pages in the site so far, and it's performing well on the front-end. The issue is that if anyone on our team touches the page editor (wp-...
11
votes
2answers
2k views

WP_Query leaking absurd amounts of memory

Every time I call WP_Query() in the function below, Wordpress leaks 8 megs of memory. And since I call this function a lot, things get hairy pretty quickly... :( I've tried unsetting the resulting $...
10
votes
6answers
21k views

How to use more than 256MB of memory in the admin?

I'm building a site for a photographer who uploads pictures that are normally large for todays digital cameras. Images are quite memory intensive, especially the image operations like creating ...
9
votes
4answers
328 views

Is there a way to exclude the content from the post variable to save on RAM usage?

So, I've run into what looks like a WP RAM usage problem and am looking for a solution. The only place I'm really having this problem on my site is with a Site Map page that I'm trying to populate, ...
8
votes
1answer
18k views

Programmatically adding images to the media library with wp_generate_attachment_metadata randomly fails

I am running the latest WordPress version (4.6) on a LAMP server (shared hosting) with PHP version 5.6.12. I am trying to programmatically add 10 images, uploaded with ftp to the wp-uploads directory,...
8
votes
3answers
2k views

What's the ideal way to profile WordPress memory usage?

We're running a WordPress multisite instance on two Rackspace Cloud servers, one web and one database, with 30 or so sites currently. I've put Nginx in front for static assets and Apache handles all ...
6
votes
2answers
235 views

Wordpress variables and memory

When checking get_defined_vars() on an empty template file my theme loads over 70000 lines of output. Before even including elements on a page all of this is loaded. Is this correct? Is there any ...
6
votes
1answer
2k views

Allowed memory size of 268435456 bytes exhausted (tried to allocate 7146491840906359738 bytes)

We're on v4.4.10 and keep having to restart the web server due to this issue. I've read various other posts and increased the wp-config.php memory, but still get this error. [23-May-2017 11:39:43 ...
6
votes
2answers
1k views

Multiple WordPress sites eat up alot of RAM

I have a VPS with 30 WordPress sites. I am running nginx & APC and notice it eats up my RAM up to 1GB and it increases each time I add another site. I notice APC is the one that's causing the ...
5
votes
3answers
3k views

PHP memory friendly alternative to get_posts()

I was running into memory issues with this: get_posts( array( 'posts_per_page' => '-1', 'post_type' => array( 'product', 'product_variation' ) ) (there are thousands of results) just trying to ...
5
votes
3answers
2k views

Decreasing the Memory Consumption of a WordPress Site?

The test site requires a lot of memory when viewing some category/archive pages. I met with the following error messages yesterday: Fatal error: Allowed memory size of 33554432 bytes exhausted (...
4
votes
2answers
22k views

What's the difference between WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT?

What's the difference beetween define( 'WP_MEMORY_LIMIT', '96M' ); and define( 'WP_MAX_MEMORY_LIMIT', '256M' ); In my host I have this define( 'WP_MEMORY_LIMIT', '786M' ); define( '...
4
votes
1answer
894 views

$wpdb->get_results leaking memory

I have developed a wordpress plugin that reads large custom xml files and imports the information as custom post types and a lot of post meta information. So I am calling a lot of database ...
3
votes
3answers
3k views

Memory needed to host 200 wordpress sites?

I'm planning to use Multisite to host 200 different wordpress blog with each having their own unique subdomain. I notice each time I create a virtual host for each subdomain it'll use roughly 50mb ram....
3
votes
2answers
241 views

Does a WP site consumes memory resources when there are NO visitors?

I understand that every time a visitor goes to a website, it triggers the PHP code that then demands system resources. My situation is that I have many websites, some not used, just sitting there, ...
3
votes
1answer
3k views

PHP Memory Limit vs. WP Memory Limit

I'm using TPC! Memory Usage Settings to monitor my installation's memory usage. The plugin displays 'WP Memory Limit' which I know is set by the wp-config.php. It also displays 'PHP Memory Limit' ...
3
votes
2answers
4k views

Best way to diagnose which plug-ins/theme uses the most memory?

I've just upgraded one of my WP websites from 3.1.4 to 3.4.2 and I got an error message. Fatal error: Allowed memory size of To fix it, I added define('WP_MEMORY_LIMIT', '128M'); to wp-config.php,...
3
votes
3answers
324 views

How can Wordpress be made more memory efficient?

Let's assume this is a site that has dynamic content pertaining to the user, or content that changes very often, so varnish is out. Let's also assume that there are no plugins and the theme is vanilla....
3
votes
2answers
557 views

Wordpress database becoming huge. How to analyze and optimize it? fear of running out of memory

look at the size of my wordpress database tables: are there simple ways to optimize it? I fear of running out of memory one day maybe bad collation? how can I analyze what is eating up so much space ...
3
votes
2answers
412 views

What is the most efficient way to search users by their display name?

Initially I thought I'd use get_users() but it turned out it doesn't support the display_name field. Then I've read about using WP_User_Query, but when I do it always exhausts the allowed memory size ...
3
votes
2answers
8k views

WordPress plugin installation error

I have installed WordPress 3.8 and now I am trying to install WooCommerce - excelling eCommerce 2.0.20 plugin but every time I am getting this error: Note: I am trying to install plugin in local ...
3
votes
1answer
3k views

High CPU & Memory Spikes?

I randomly get high spikes in CPU and Memory. I have deactivated nearly all plugins trying to find the culprit. I have been turning on a few at a time then waiting 30 minutes to see how if the server ...
3
votes
0answers
1k views

CPU usage: AJAX and Heartbeat API on admin pages

My (shared) web host recently sent me this: "Our server monitoring systems keep indicating high server load persistently maintained by your website (...). Most of the hits are to the /www/www/wp-...
2
votes
4answers
1k views

Wordpress media upload limit?

I've done numerous WP sites, written my own plugins, run my own server, etc etc. But I have not seen this before. I just installed a fresh 4.7.1 and installed the Proto theme and all its plugins. ...
2
votes
2answers
460 views

Memory usage when querying users

I'm having a small issue with one of my queries here. I cannot increase my wordpress memory limit as long as hostgator sets it to 64mb. I'm not sure if its possible to reduce the amount of memory used ...
2
votes
1answer
1k views

How to solve suspected memory issue in custom WordPress loop?

I have written a plugin that adds a "Where did you hear about us?" question to the WooCommerce checkout page and shows the results (as a simple horizontal bar chart) in a wp-admin page. The plugin ...
2
votes
2answers
142 views

How can I free up the memory used by update_post_meta?

I've noticed that each call to update_post_meta results in a small increase in my memory usage. Normally, the increase is small enough to not matter. But I'm writing a CSV import function that calls ...
2
votes
2answers
1k views

Not enough memory

Sometimes after activating a plugin the admin side is blank with a memory error message, sometimes the front page too. The standard fix is to increase the memory in config.php. What is the best way ...
1
vote
2answers
351 views

Allowed Memory Size Error in WordPress

My WordPress is always down. I contacted my host and they said that the server is fine. My WordPress site has some basic plugins which are all in one seo seo search tagging google xml robots.txt ...
1
vote
2answers
259 views

How many caching plugins should be used?

Online researching shows that there are many plugins out there to perform caching on WP. Just to name a few: WP Super Cache W3 Total Cache WP Widget Cache DB Cache Reloaded 1 Blog Cacher Hyper Cache ...
1
vote
3answers
6k views

WP_MEMORY_LIMIT didn't work in wp-config

I want to set WP_MEMORY_LIMIT for my WordPress site. I use from shared hosting and CPanel. I have access to change something like max memory limit on my host. I attached related image in the following ...
1
vote
2answers
890 views

loop through all posts memory error

I have few thousands posts and need to list all of them in the admin. When I used WP_Query to get them all at once I got a memory error. Then I split it into several query calls and it worked just ...
1
vote
2answers
2k views

Mass importing json data into custom fields (postmeta)

I am in the process of importing large amounts of data into a custom post type that has several custom fields (postmeta fields created by Advanced Custom Fields). I am using the following function to ...
1
vote
1answer
1k views

Memory errors with media upload, Wordpress can't use more than 96M (while there's 512 available!)

I'm aware that this is a known problem but I was unable to address it using information found in WPAnswers and Wordpress support forums. In my Worpdress single site installation the media uploader is ...
1
vote
2answers
162 views

Can you limit the memory usage of a particular plugin?

I know that it is possible to restrict (or extend) the memory usage of the entire WP site using: define('WP_MEMORY_LIMIT', '64M') Is it possible to do the same for only one plugin that the website ...
1
vote
1answer
103 views

Are there individual memory allocations for different user roles in WordPress?

I am attempting to edit a specific page via the WordPress admin area while logged in as an Editor, however, the page dies with the following error: Fatal error: Allowed memory size of 134217728 ...
1
vote
1answer
2k views

Set WP_MAX_MEMORY_LIMIT higher than PHP.ini memory_limit

I've read here, but I want to ask if I have understood this correctly. We have a server in which WordPress admin needed more memory. The PHP memory_limit, in PHP.ini, is set to 256M, and so was ...
1
vote
1answer
446 views

Updating beyond WordPress 4.2.1 yields “allowed memory size exhausted”

I have a Windows Server running Plesk that has several WordPress sites. The PHP version on each is 5.5.26. One, which uses the defaults for PHP, updates to the latest (4.2.3) with no issues, while ...
1
vote
2answers
489 views

Downsize CPU & DB usage in wordpress

i have created a smart interface WP based which we use to manage clients.. it uses a lot of information and data each time a client is returned / viewed. it is a locked interface and does not have ...
1
vote
1answer
699 views

Make WP_Query more efficient?

Ok - so using a WP_Query to count votes by a user. But now there are 23,000 votes and its using up lots of memory. Is there a way i can make this WP_Query more efficient? $args = array( '...
1
vote
2answers
4k views

Wordpress Defined Memory Limit

Running a dedicated managed server with 2 GIGS of RAM. How much memory can I define in wp-config.php Currently I have define('WP_MEMORY_LIMIT', '256M'); I suspect a plugin that resizes images when ...
1
vote
3answers
6k views

In big trouble - Allowed memory size of 268435456 bytes exhausted

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 81 bytes) in /home/public_html/hol/wp-includes/meta.php on line 571 I'm receiving this error when I try to log into my ...
1
vote
2answers
2k views

Fatal error: Out of memory

i have a memory issue while NextgenGallery try to create the thumbnails. Wp-Version is 3.4.1 Fatal error: Out of memory (allocated 29884416) (tried to allocate 2000 bytes) in /xxx/wp-content/plugins/...
1
vote
1answer
293 views

Find Memory Usage of Admin

I have seen tips which show you how to display the memory usage of your website. This usually involves adding php code to your website theme's function.php file. However, I am looking to display the ...
1
vote
1answer
352 views

How often does the RSS widget get updates?

I am asking since I am trying to understand if this widget is causing my server to overuse CPU or memory. But either way - it's interesting to know.
1
vote
2answers
10k views

Out of memory errors - anon-rss or file-rss?

Can anyone help me figure out both which plugin might be causing this error and how I fix it? [4405235.617144] Out of memory: kill process 1450 (apache2) score 75568 or a child [4405235.617155] ...
1
vote
2answers
539 views

Memory Leak in plugin action

I made a plugin that basically reads a CSV file and imports data to relevant tables. However, the action seems to create an error: Fatal error: Allowed memory size of 134217728 bytes exhausted (...
1
vote
1answer
406 views

Wordpress out of memory allocated issue?

I have facing out of memory allocated fatal error in wordpress. i have printed the phpinfo(); and check for the memory_limit . so both values are 512M. I have also added following code in my wp-...
1
vote
1answer
52 views

wp_trash_post is leaking memory

I have a plugin that deletes a list of posts based on their post id. The code is very simple foreach ( $post_ids as $post_id ) { wp_trash_post( $post_id, true ); } } ...