Where Is php.ini in WordPress? (& How to Edit This File)

Wherever Is php.ini in WordPress? (& How to Edit This File)

Are you pondering where the php.ini file is located on your web page?

Php.ini is a crucial file in your WordPress installation. You’ll often need to edit it for superior performance and functionality of your web site. Nonetheless, quite a few website homeowners really do not know exactly where it is located.

In this short article, we’ll display you the place is php.ini in WordPress and how to edit this file.

Where is php.ini in WordPress and how to edit it

To assistance you navigate the article, you can click the inbound links underneath to leap to any segment you are intrigued in.

What is php.ini file in WordPress?

The php.ini file is a default configuration file for PHP on your WordPress web site. PHP is a scripting and programming language on which WordPress is composed.

It’s utilised on the server aspect of matters, which usually means it runs on your world wide web web hosting server. Through PHP, WordPress is able to show your blog site posts, solutions, media material, and much more.

The php.ini file configures how PHP operates and can have a enormous effects on your website’s operation. Every time PHP runs on your internet site, it will seem for this file.

That claimed, let us see why and when you are going to need to have to edit the file on your web-site.

Why Do You Need to Edit php.ini File in WordPress?

The php.ini file is incredibly important for your site’s overall performance and operation. This usually means you can edit it to guarantee your internet site works effortlessly or resolve any mistakes.

For occasion, modifying the php.ini file makes it possible for you to boost the maximum file upload measurement and source limitations.

If you have a pictures web site or a site that necessitates a whole lot of videos and images, then you could encounter an mistake ‘uploaded file exceeds the add_max_filesize’ concept.

Rising the upload dimension in the php.ini file will aid take care of this error and allow you to effortlessly add greater media documents. Furthermore, you can also raise the accessible memory to accommodate extended weblog posts with tons of illustrations or photos.

Check current file upload size limit

In the same way, the php.ini file allows you edit the file timeout configurations. If a file usually takes extended to course of action, then your web-site can timeout and prevent processing the ask for. To avert this from occurring, you can boost the range of seconds prior to timeout by means of the php.ini file.

And finally, you’ll also be ready to empower or disable file extensions in PHP by editing the file. This is genuinely handy if you see a ‘Your PHP set up appears to be lacking the MySQL extension’ error on your site. It assists correct this error and take care of troubles when establishing a database link.

Now, let us glance at wherever the php.ini file is positioned in WordPress.

Finding the php.ini File Location in WordPress

There are various means you can find and perspective the php.ini file.

You can use your internet hosting service’s cPanel, a plugin, or an FTP consumer to entry your web site documents and folders.

1. Use cPanel to Identify the php.ini File

You can use the cPanel delivered by your WordPress hosting service provider and obtain the File Supervisor to track down the file. This process is rather uncomplicated, and you really don’t need to edit any code.

For this tutorial, we will use Bluehost to accessibility the cPanel. If you’re employing another internet hosting service, then the techniques could fluctuate.

First, you are going to want to log in to your Bluehost account. From here, merely click the ‘Advanced’ selection in the remaining panel.

Open advanced settings in Bluehost

On the following monitor, you will see the cPanel of your website.

Simply just scroll down to the Data files portion and click the File Supervisor alternative.

Open file manager in cpanel

Immediately after that, you’ll see all the folders and documents of your WordPress web-site.

From the still left panel, you can navigate to the ‘public_html’ folder. Up coming, you must see documents in the folder on your appropriate. You can scroll down and find the ‘php.ini’ file.

Locate php.ini file

To download the file for editing, you can simply suitable-simply click the php.ini file and preserve it on your pc.

2. Identify the php.ini File utilizing a File Manager Plugin

One more way of locating out exactly where is the php.ini file in WordPress is by using a plugin like WP File Supervisor.

It is a free WordPress plugin that allows you edit, down load, delete, and arrange your information and folders straight from the WordPress dashboard. You never have to use an FTP customer or cPanel to accessibility your site’s files.

First, you are going to have to have to install and activate the WP File Manager plugin. If you need assist, then make sure you see our tutorial on how to set up a WordPress plugin.

On activation, you can head to WP File Manager from your WordPress admin panel.

Up coming, you are going to need to have to select the ‘public_html’ folder from the panel on the still left. Right after that, you can scroll down and navigate to the ‘php.ini’ file.

View php.ini file in file manager plugin

Once you have found the file, only correct-click to obtain it on to your laptop.

3. Obtaining php.ini Path in WordPress working with the phpinfo.php File

You can also find the php.ini file by building a phpinfo.php file and positioning it in the root directory of your WordPress installation.

This is a a little bit innovative method and is advisable for persons who know how to use an FTP customer and entry the root listing of a web page.

Very first, you’ll need to have to develop a new text editor file. You can use Notepad, Bracket, Sublime Textual content, or any very similar software program to build one particular. In the file, guarantee that you enter the next code:

Subsequent, you will require to help save the file and title it phpinfo.php. You can use any other title, but make absolutely sure that there is ‘.php’ at the conclusion.

Soon after that, you will need to have to use an FTP customer to entry the root directory of your web page and upload the file. Simply just drag the phpinfo.php file from the left panel and fall it into your site’s root directory.

Upload php info file

If you have to have aid, then remember to see our tutorial on how to use FTP to upload data files to WordPress.

Next, you will will need to enter the pursuing world wide web handle in your browser:


Just make positive that you substitute the ‘example.com’ with your domain title.

From in this article, you are going to see details about PHP set up on your web page and the path for locating the php.ini file.

View php installation details

To uncover the path of the file, you can seem for the ‘Configuration File Path’ or ‘Loaded Configuration File’ fields.

You’ll see the route for the php.ini file in either a person of the fields.

View path of php ini file

After you know the route, you can obtain your site’s information working with an FTP shopper.

From there, simply just go to the route you just identified and down load the php.ini file.

Access path of php ini file and download it

Modifying the php.ini File in WordPress

Now that you know the site of the php.ini file, the next move is to down load and edit it.

Go in advance and open up the file in Notepad or any other text editor.

Edit php ini file

Following, you can edit the file to increase your site’s efficiency. In this article are a couple typical configurations you can make in the php.ini file:

  • max_excecution_time – This is the time needed to run commands and execute scripts. You can increase the default time of 60 to a higher number if you are uploading significant information to the server.
  • memory_restrict – It relates to the memory necessary to add documents and execute instructions. Enhancing the memory restrict will enable you accommodate very long material and loads of images. By default, it is set to 256M, but you can maximize the memory restrict.
  • upload_max_filesize – Modifying this selection permits you to add substantial media documents and enhance the restrict.
  • submit_max_measurement – If your blog posts incorporate a whole lot of images and video clips, then the dimension of the publish will improve. To prevent any mistakes, you can boost the put up_max_measurement to accommodate far more intensive article content.

After you have produced these modifications to the php.ini file, you can simply add it again to your server in the identical spot using the cPanel, an FTP consumer, or the file supervisor plugin.

We hope this short article assisted you discover the place is php.ini in WordPress and how to edit it. You may also want to see our guide on the most frequent WordPress faults and the most effective WordPress plugins.

If you favored this short article, then be sure to subscribe to our YouTube Channel for WordPress online video tutorials. You can also come across us on Twitter and Fb.