Easiest Way to Edit php.ini File on XAMPP

Screenshot of XAMPP control panel

Do you run a WordPress (or any Content Management System) on your local drive, particularly XAMPP? Have you ever tried to upload something and you got the error: “Fatal Error: Maximum Execution Time Exceeded in …”? If you are searching for solution for this error, then you are in the right place. In this article I’m going to walk you through step by step on how to increase the Max Execution Time on XAMPP by editing the php.ini file.


I ran into this error in my early days of designing WordPress websites on local drive using XAMPP. Most of the solution I came across were either not working or not straight forward enough. I took my time to search diligently before I found the best solution on this page: https://stackoverflow.com/questions/6185319/how-to-locate-the-php-ini-file-xampp. The solution on this page is quite hidden at the bottom of the thread, so I decided to put this article together dedicated to this error and how to fix it. So let’s roll!


How to Edit php.ini File in XAMPP, Editing the PHP Time Limit and PHP Max Input Vars

I will describe the solution using the screenshot of XAMPP control panel below.

Screenshot of XAMPP control panel

Looking at the screenshot above, we see that there’s a “config” button next to the “start” button for Apache, MySQL, FileZilla, Mercury, and Tomcat. To get access to the php.ini file, we will click on the “config” button for the Apache tab. Once we click on it, it should pop up a dropdown as shown in the image below.


Screenshot showing how to access php.ini file on XAMPP

As we can see on the image above, one of the options in the dropdown is php.ini. Just click on it, it should pop open in your default text editor (e.g. notepad). Once it is opened we should have something like the screenshot shown below.


Screenshot showing opened php.ini file


Once you have it opened as shown above, make sure your cursor is inside the file. With the cursor inside, press CTRL + F on your keyboard. That should pop up a search dialog box as shown below.


A screenshot showing how to search for code in php.ini file


In the dialog box (as shown in the image above), type into the search bar whatever you are looking for. In our case we are going to search for the following and make adjustments to their default settings.

  • upload_max_filesize = 25M
  • post_max_size = 13M
  • max_execution_time = 300

As an example, if I want to make adjustment to maximum execution time, I’d type max_execution_time into the search box as shown in the image below, and click “Find” or simply press “Enter” key on my keyboard. This will take you directly to the max_execution_time line of code.


Screenshot showing how to increase max execution time in php.ini file


As you can see on the screenshot above, my max_execution_time is set to 120 by default. I can change it to any value from 300 upward.


You can follow the same method to make adjustment to other parameters listed above. Note that sometimes once you search for something, you’d have to make changes to it and save the file, close it and reopen before searching for other parameters.


If you follow this step you should be able to make adjustment to php.ini file, not only on XAMPP but on your cPanel.


Related Posts


Hostinger Review

You probably have considered developing/building a website at some point in your life. If so, then you might have looked into different web hosting services.

Read More »

Leave a comment

Your email address will not be published. Required fields are marked *