Q.where is php.ini file location wordpress?
Answer; located at same directory where your WordPress installed.
Allowed memory formats 32, 64, 128, 256, 512, 1024M or more in Mbs only not in GBs or G for a WordPress website.
Make sure to check your webmaster allocated memory, In shared hosting default, will be 1024Mb for your account but some shared hosting servers provide 512MB also 256 based on the quality of hosting.
How to check Allocated memory for a WordPress website /install?
generally, we can check server status by .php.info file available at official PHP website. but this may check all server info.
for my case newspaper theme suggested to change the memory and I increased 48MB to 256M to (before this I am getting 503 services limited reached error on 1and 1 hosting).
So I want to increase all of my WordPress install located different servers.
so all I need to know how to check WordPress allocated memory, and after configuring the extra memory to WordPress is there any change or not.
may be a plugin help this. also, WordPress is rich of plugins. if plugins not available then I have to use only newspaper theme.
don’t worry I will update it soon after I tested.
I have found the solution:
just create phpinfo.php
add this code ”
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
“
upload to server, and access
yourwebsite.com/phpinfo.php
and press CTRL+ F search for Memory
you can find memory limit: mine is tested install another shared hosting server is 128M
and there is other 2 WordPress installation in the same directory, I have to check both too.
I have checked the previous which I set 256M memory, that hosting provided allocated memory is 62914560 (may be in KB) 62914 Mbs or 62.3GB memory. I have to test it.
I have edited wp-config and added 62914M and I got 61GB in the request through newspaper system status.
that’s it we have to go for another servers
48M-256 to 61GB memory another server (but same problem facing 503 error resources limit reached for login.php I don’t know with web page maybe with PHP max execution time limit)
Shared Server 2
1st install 120M in shared hosting account
2nd add-on website directory memory limit is 32M
3rd 32M
4th 32M
so I have to check this from root directory users name of shared account.
but this is not accessible because only documents in public/HTML folder can access them.
Now I need to increase limit through wp-config, I have added it up to 256M but not increase still 128M only,
also decreased to 64 but it still 128M in the main directory, so let me go to the subdirectory I will change 32 to 64M, no change I will ignore that server,
Next GoDaddy managed
Deluxe 128M for wp install No change after configuring to 256M no change also after decreasing the memory so host allocated memory is 128M, let us go to starter plan
Starter: 128M no change after increasing/decreasing the memory.
Just test another provider: limit by default set to 128M no change after adding the memory.
But installed newspaper theme that showing 256MB as request I have to check further, increased 1024MB showing 1 GB, I have increased up to 4Tb
theme showing 4Tb request ok what about performance,
and their actual memory on server.for a shared they may use up to 20GB Memory and 4 CPUs for 150-300 shared accounts, 150*5=750 websites.
and they allocated 1 GB virtual memory to my account.
60GB memory server max execution time is 30 others are 120Seconds.
I have installed Server IP & Memory Usage Display plugin which display memory usage of WordPress and allocated memory with Ip address in admin footer.
That displaying Memory: 24.45 of 62914560 MB (0%) | WP LIMIT: 61 GB (wp config php added)| IP …… | PHP 7.0.0 @32BitOS
Actually allocated memory in that directory 63GB then all of the memory using by me. After updating that my WordPress website getting very fast..
I m lucky that hosting provider.
I have installed change memory limit plugin on another server which they allocated only 32MB Memory, default is is 40MB
I have changed memory limit using plugin, but that worked because host provider limited that only.
I have to contact them.
contacted and the chat support increased immediately by editing php.ni and .htaccess in shared server root account PHP.ni located home/username/PHP.ni
/home/username/public_html/.htaccess
now my memory is
268435456 MB 268435 GB y plugin and 128 before after 256M now by PHP info file
Shared server 2
Memory: 26.46 of 4445096 MB (0%) | WP LIMIT: 4 TB
but phpinfo.php displaying 128M
Godaddy managed wordpress starter plan
11.06 of 128 MB (9%) | WP LIMIT: 40 MB
After i increasing the 40MB to 1024M igot this results Memory: 10.89 of 1024 MB (1%) | WP LIMIT: 1 GB | phpinfo file 128M only.
Godaddy managed deluxe Memory: 14.65 of 268435456 MB (0%) | WP LIMIT: 256 MB (limit set of by me otherwise it will be 40MB
After increasing the wp-config to 2048 M results is Memory: 14.41 of 2048 MB (1%) | WP LIMIT: 2 GB PHP info file results remains same as 128M.
we only have to trust PHP info results only.
All of my websites memory usage is 25MB Average,
How much a WordPress website Memory cnsumes?
32M to 48 94M 12
define( ‘WP_MEMORY_LIMIT’, ’96M’ );
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
define( ‘WP_MEMORY_LIMIT’, ‘1024M’ );
define( ‘WP_MEMORY_LIMIT’, ‘2048M’ );
/* That’s all, stop editing! Happy blogging. */
Setting max exectuion time & variable
edit php.ini in WordPress directory and add this
increase wordpress memory & file upload size with php.ini
max_input_vars = 5000
max_execution_time = 300
memory_limit = 64M
post_max_size = 50M (fie size 50Mb i doneed i except this)
suhosin.request.max_vars = 5000
suhosin.post.max_vars = 5000
Added to php.ini not worked, so I have to use Htacess.
Suhosin not installed so I can’t modify the Suhosin settings
.htacess
php_value max_input_vars 5000
php_value max_execution_time 300
php_value post_max_size 50M
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000
increase WordPress memory limit & file upload size through .htaccess
<IfModule mod_php5.c>
php_value post_max_size 5M
php_value upload_max_filesize 5M
php_value memory_limit 128M
php_value max_execution_time 300
php_value max_input_time 300
php_value session.gc_maxlifetime 1200
</IfModule>
<IfModule mod_php5.c>
php_value max_execution_time 300
php_value max_input_vars 5000
</IfModule>
not worked, so i go for plugin
installed the plugin but no change but that below code to .htacess
# WP Maximum Execution Time Exceeded
<IfModule mod_php5.c>
php_value max_execution_time 300
</IfModule>
in my phpni kisted below.
safe_mode=false;
upload_max_filesize=41943040;
post_max_size=52428800;
max_input_vars = 5000;
max_execution_time = 300;
memory_limit=62914560;
extension_dir=/usr/lib/php7.0/extensions;
zend_extension=/usr/lib/php7.0/extensions/opcache.so;
opcache.enable=1;
opcache.memory_consumption=32;
opcache.interned_strings_buffer=8;
opcache.max_accelerated_files=3000;
opcache.revalidate_freq=180;
opcache.fast_shutdown=0;
opcache.enable_cli=0;
opcache.revalidate_path=0;
opcache.validate_timestamps=2;
opcache.max_file_size=0;
opcache.file_cache=/kunden/homepages/28/d605205351/htdocs/.opcache;
opcache.file_cache_only=1;
Increasing file Size upload limit
in hosting raja there is 2 MB max file upload. I have tried htaccess and php.ni nothing changed. php.ni configuration file is loaded from their main server. we can see in phpinfo.php
asked the support and they increased upto 64MB. also increased memory limit from 128M to 386M.
Conclusion: This a Brainstorm of me while increasing the WordPress PHP memory limit. So I have added here to help others who are in the same situation. Make sure to check my next post about shared server resource limits by company,
Ask a Question:
You must be logged in to post a comment.