Since version 2.5 there is a wp-config.php option WP_MEMORY_LIMIT which allows you to configure the maximum amount of memory that can be used by PHP.
When you change this option in the wp-config.php it will only affect your WordPress site and not any other PHP sites.
The default memory allocated to WordPress is 32MB, if the value in the php.ini is more than the allocated WordPress amount WordPress will use this value. For example if WordPress has allocated 32MB of memory and php.ini is configured to 64MB then WordPress will use 64MB.
To change the WordPress memory limit you just add the following into the wp-config.php.
If this doesn’t change your allocated memory limit your hosts may not allow you change this setting, if this is the case you should contact your hosting company.
You can change the memory limit of your website in the PHP.ini file, with some web hosts you might not have access to change the PHP.ini file for your website. But if you do search for the property memory_limit and change the value to something greater like 64M.
memory_limit = 64M
You can even change the memory limit of PHP from your sites htaccess file. Go to the root folder of your website and create a new .htaccess file if it doesn’t already exist and add the following line to your htaccess file.
php_value memory_limit 64M