Increase The Php Execution Time

     

*

Typical warning message related lớn upload và memory limit

While working on your WordPress trang web, you might sometimes see the following type of warning.

Bạn đang xem: Increase The Php Execution Time

warning post content-length of bytes exceeds the limit... The uploaded file exceeds the upload_max_filekích cỡ directive in php.ini... exceeds the maximum upload kích thước for this site... Fatal error: Allowed memory form size of 12345678 bytes exhausted (tried to lớn allocate 2345678 bytes) in /home/your-web1_username/public_html/wp-includes/plugin.php on line 1000... 413 Error: Request Entity Too Large

=> Those messages are typically related khổng lồ your website"s server web1_settings for maximum upload kích thước or memory limit.

Cheông chồng your current system web1_settings

First of all, kiểm tra your current hệ thống memory web1_settings.

In the Customizr or Customizr Pro WordPress themes, we have a feature lớn let you easily check your system"s information. This will be helpful when troubleshooting errors.

For Customizr Pro Theme, you can find it in WordPress admin -> Appearance -> About Customizr Pro For Customizr Theme, you can find it in WordPress admin -> Appearance ->About Customizr Scroll down the page and you will see the section - System Information.

File exceeds the upload_max_filesize

You may have sầu encountered the following error message when you are installing your Customizr Pro Theme.

The uploaded tệp tin exceeds the upload_max_fileform size directive sầu in php.ini

Please see the following screenshot.

*

Or the following error when you are uploading an image.

..exceeds the maximum upload kích cỡ for this site.

Please see the following screenshot.

*

This happens when your PHPhường Upload Max Filekích cỡ (upload_max_filesize) phối in your php.ini tệp tin is smaller than the file size of Customizr Pro Theme or the tệp tin kích cỡ of the image that you are trying lớn upload.

At the time of writing, the file kích thước of Customizr Pro Theme (zip file) is 11.2M.

Look inkhổng lồ your System Information for the value of PHP Upload Max Fileform size, you will need to lớn increase it to lớn a higher & healthier value.

Xem thêm: Thiết Kế Web Bán Hàng Online, Thiết Kế Website Bán Hàng, Tạo Web Chuyên Nghiệp

Solutions

The following are some solutions available lớn fix your exceeded upload max filekích cỡ issue in WordPress.

Contact your Hosting Company

Yes, this is the most preferred way. Liên hệ your hosting company & show them a screenshot of your error, or tin nhắn them the error message. Ask them to lớn assist by increasing the following values, until you are able to install your theme or upload your image. Your hosting company may have sầu restrictions on these values.

memory_limitupload_max_sizepost_max_sizeupload_max_filesizemax_execution_timemax_input_time Preferably khổng lồ the following values.

memory_limit = 256Mupload_max_size = 64Mpost_max_form size = 64Mupload_max_filesize = 64Mmax_execution_time = 300max_input_time = 1000

Editing php.ini File

The php.ini tệp tin is the mặc định PHP. configuration file. Most of the Shared Hosting Company does not allow access to this file. If you are certain that you have sầu access lớn php.ini tệp tin on your VPS, you may proceed with the following steps.

Backup a copy of this file before attempting to edit it. Open it và find the following values, one at a time (They are located at different lines within the file)

memory_limitupload_max_sizepost_max_sizeupload_max_filesizemax_execution_timemax_input_time Preferably, edit them to the following values. memory_limit = 256Mupload_max_form size = 64Mpost_max_kích thước = 64Mupload_max_filesize = 64Mmax_execution_time = 300max_input_time = 1000

Using .htaccess file

In WordPress, there is a .htaccess tệp tin. WordPress uses this tệp tin to lớn manipulate how Apache (server) serves files from its root directory, và subdirectories. Therefore, this tệp tin is very important. Do not edit what"s originally written in this file. You can add some directives at the over of the file to increase the PHP Upload Max Filekích thước. Learn more about the htaccess tệp tin in WordPress here.

Use your favorite FTP.. program khổng lồ access your WordPress installation. Download a copy of it onto lớn your computer lớn save as backup. xuất hiện it và added the following into lớn a newline at the end of the file.

php_value memory_limit 256Mphp_value upload_max_filekích thước 64Mphp_value post_max_form size 64Mphp_value max_execution_time 300php_value max_input_time 1000 Save sầu your changes and overwrite the .htaccess tệp tin on your server. Go baông xã to lớn your System Information & kiểm tra if your values have changed. If not, you should liên hệ your hosting company for assistance in editing these values in your php.ini file.

Fatal Error: Memory Exhaust

If you are experiencing trắng screen on your site or at intermittent và in different webpages. Set WP_DEBUG lớn true in your wp-config.php. If you are seeing something similar to lớn the following error message on screen or in your VPS error log

Fatal error: Allowed memory kích thước of 12345678 bytes exhausted (tried to allocate 2345678 bytes) in /home/your-web1_username/public_html/wp-includes/plugin.php on line 1000

This means your PHP does not have sầu enough memory to lớn work properly.

Solutions

The following are some solutions available khổng lồ fix your memory exhaust issue.

Contact your Hosting Company

As mentioned above, this is the preferred way. Show them a screenshot of your error or write khổng lồ them the error message. Ask them to assist in increasing the PHPhường memory, until you are able lớn get your site working properly.

Amending your wp-config.php

You can try adding a memory define lớn WordPress in it"s wp-config.php, but this will not work, if your defined memory exceeds your actual hệ thống allocated memory.

Use your ftp program and navigate to lớn your WordPress root directory. Find your wp-config.php and download a copy to your computer as backup. xuất hiện up wp-config.php using your plain text editor or code editor. Insert the following code at the over of the tệp tin.

define("WP_MEMORY_LIMIT", "256M"); Save và upload bachồng your wp-config.php to your WordPress installation. Clear your browser cabít and re-load your website. If you are still experiencing error, you should contact your website hosting company for assistance.

Editing php.ini File

If you have access to lớn the php.ini tệp tin. you can try the following.

Using FTP program, navigate to lớn your hosting server and look for the php.ini file. Download & keep a backup copy. mở cửa it using your code or plain text editor. Find the following.

memory_limit Change the value to a much higher value. For example. memory_limit = 256M Save và upload baông chồng your php.ini to your WordPress installation. Clear your browser cađậy & re-load your website. If you are still experiencing error, you should tương tác your website hosting company for assistance.

Using .htaccess file

Use your FTP program lớn access your WordPress installation. Go to the root directory, it"s the directory where you can find your wp-config.php tệp tin. You should be able lớn find your .htaccess file. Download a copy of it onkhổng lồ your computer to lớn save as backup. Open it và added the following into lớn a newline at the over of the file. php_value memory_limit 256 Save sầu your changes & overwrite the .htaccess tệp tin on your hệ thống. Go baông xã khổng lồ your System Information and check if your values have sầu changed. If not, you should tương tác your hosting company for assistance in editing these values in your php.ini file. That"s all for this documentation. Hope it helps!