Safely increasing memory on my site without getting any more errors

Hiya.

This is just a post to make sure that what I'm about to do on my site is correct.

So I originally brought up the memory problem in this thread, but since that post was originally about something else entirely, I'm opening up a new topic here.

To reiterate, I was getting lots of messages on the backend such as "Resolving host timed out" or "Operation timed out after 5000 milliseconds with 0 bytes received". @Tyler Postle correctly pointed out that it was a memory issue, and suggested I change my htaccess file to this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

php_value memory_limit 512M
php_value max_execution_time 60

This got rid of those pesky error messages on the backend for a while! :slight_smile:
Unfortunately today when I went to my site, I had a 500 internal server error message waiting for me. When I looked at htaccess again, it now said:

`# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
ss

# File modified on Tue Nov 3 11:39:52 2015 by server
# For security reasons, mod_php is not used on this server. Use a php.ini file for php directives
# php_value memory_limit 512M
# For security reasons, mod_php is not used on this server. Use a php.ini file for php directives
# php_value max_execution_time 60'

Getting rid of the bottom part brought my site back to life, thank goodness. So the message in this is telling me to use a php.ini file instead (as instructed in the link @Tyler had also given me here).

That's definitely what I'll do now, but...should I use the exact example in that article? Or will I need more memory for my particular site? (And does increasing it too high pose other risks?)
My site is going to have about 400-500 members with profiles, uploading photos and such. (Though we're expecting only 100 or less to be active on a regular basis).

I need to launch this site this week, and I just want to make sure I'm doing things correctly and don't have any problems right away....

Thanks.

  • Kasia Swiderska

    Hello Anton,

    That's definitely what I'll do now, but...should I use the exact example in that article? Or will I need more memory for my particular site? (And does increasing it too high pose other risks?)

    That really depends on how much resources your site needs. This means - increase those values (or in the case max_execution_time decrease to 60) to point where you don't have errors from your previous threads and you don't ave any 500 interval server errors.
    Values in article are the sample values - you might need less or more.
    If your memory limit was 64M, try to increase it to 128 - if this is not enough, then double it.

    Kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.