General Topics

Change PHP Settings Strategy For Beginners

Here we will discuss how to change php settings via CPanel? PHP is a language which is available for shared, VPS and dedicated servers. PHP language is not difficult language which can modify by your own end. So in this article, you will get idea how to change php settings via CPanel?

View Current php Settings / (Change php Settings Via CPanel)

If you want to view current php setting or change php setting via CPanel. Then create a phpinfo.php file and call this by the given method in this article. View php Settings.

There are two modules of php which is as under:

  • Apache Module
  • CGI Module

So first find out about configured php on your site’s server. For this purpose just find out “Server API”. If the value is CGI then its mean “CGI Module” but if the value is Apache then it is “Apache Module”.

Server API: Apache

If your site’s server has configured on Apache Module. Then you can php setting through the .htaccess file. The .htaccess file uses for making changes in your site’s server. If it is available then good otherwise you can create this file by update setting of permalinks. Just click on Setting » Permalinks and hit save changes. You can also see the here method to create a .htaccess file WordPress.

So if you want to update your PHP setting then just place the below line in your site’s .htaccess file. You can read here access the .htaccess file WordPress? In fact, .htaccess file starts with a dot. Due to this, it is hidden file. So before accessing just check the option to show hidden files.

php_value Directive value

Like as if you want to increase max_input_time from 60 to 120 then use the below line in your .htaccess file. In the case of 500 internal server error just again check the syntax spell.

php_value max_input_time 120

Server API: CGI

Now if your site’s server is configured on CGI. Then you can create a php.ini file in your public_html folder or search if already created.

Now just check the below code if it is already available in the php.ini file. Otherwise, copy the code and past it. Now if you want to change time from 30 to 120. Then change the value from 30 to 120. Now if you have opened phpinfo page. Then just refresh this and you will get 120 in the time section.

; Resource Limits ;
max_execution_time = 30
max_input_time = 60
memory_limit = 256M
upload_max_filesize = 10M

Increase Memory Limit In The php.ini /(Change php Settings Via CPanel )

While using free software or open source software. Often user faces excessive usage memory in CPanel. So if you also a victim of this error then you can increase memory using the php.ini file. Just copy the below code and replace with the current available code of your php.ini file.

max_execution_time = 30
max_input_time = 120
memory_limit = 256M
upload_max_filesize = 10M

Modify php.ini CPanel /(Change php Settings Via CPanel )

  • Login to your CPanel.
  • Now open File Manager.

File Manager CPanel

  • After it just open public_html folder.
  • If you have a php.ini file in your public_html folder then edit this. Otherwise, you can search for this file.

php.ini file

  • After it edits this file and enters the below code according to your desire.
  • Now hit save changes.
; Resource Limits ;
max_execution_time = 30
max_input_time = 60
memory_limit = 256M
upload_max_filesize = 10M

That’s the method to change php settings via CPanel. However, by the above method, you can increase php memory limit WordPress. If you face any difficulty to change php setting via CPanel then contact your hosting company or leave a comment in the comment section.

Helpful Articles

How To Verify Your Site From Google And Bing?

Website Verification From Bing In Easy Steps

WordPress Heartbeat

Tagged With
Show More

Global Blurb Team

"Global Blurb since 2015" Global Blurb providing information about SEO, Beauty, Health & Fitness, Interior designing, Fashion and ways of earning online without investing a penny. The blog designed to share ideas about different topics.

Want to contribute

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button