Zum Inhalt springen
Jetpack

Einzelne Produkte

Sicherheit
VaultPress Backup Scan Akismet Anti-spam
Performance
Website-Suche Boost VideoPress
Wachstum
Stats Social Newsletter SEO Blaze CRM
Verwaltung
Manage Mobile App

Produktpakete

Pro Tools für Sicherheit, Performance und Wachstum für deine WordPress-Website. Abgeschlossen Die vollständige Jetpack-Suite mit höheren Service-Limits.
Preise
Übersicht Was Jetpack AI für deine Website tut Skills WordPress-Superkräfte für deinen Agenten Dokumentation Deinen KI-Agenten verbinden und einrichten Erste Schritte ChatGPT, Claude oder einen Coding-Agenten verbinden Vergleichen Jetpack im Vergleich mit anderen WordPress-MCP-Konnektoren

Verbinde deinen KI-Agenten. Kostenlos.

Verbinde ChatGPT oder Claude und lass die KI deine Website betreiben – ohne kostenpflichtigen Tarif.

Für ChatGPT holen (wird in einem neuen Tab geöffnet) Oder nutze Claude (wird in einem neuen Tab geöffnet)
Support Anleitungen und Hilfe von unserem Team Dokumentation Anleitungen zu jeder Jetpack-Funktion Feature-Anfragen Request features and vote on ideas Blog Neuigkeiten, Produkt-Updates und Anleitungen
Über uns
Anmelden Erste Schritte
Sicherheit
VaultPress Backup Scan Akismet Anti-spam
Performance
Website-Suche Boost VideoPress
Wachstum
Stats Social Newsletter SEO Blaze CRM
Verwaltung
Manage Mobile App

Produktpakete

Pro Abgeschlossen
Preise
Übersicht Was Jetpack AI für deine Website tut Skills WordPress-Superkräfte für deinen Agenten Dokumentation Deinen KI-Agenten verbinden und einrichten Erste Schritte ChatGPT, Claude oder einen Coding-Agenten verbinden Vergleichen Jetpack im Vergleich mit anderen WordPress-MCP-Konnektoren

Verbinde deinen KI-Agenten. Kostenlos.

Verbinde ChatGPT oder Claude und lass die KI deine Website betreiben – ohne kostenpflichtigen Tarif.

Für ChatGPT holen (wird in einem neuen Tab geöffnet) Oder nutze Claude (wird in einem neuen Tab geöffnet)
Support Anleitungen und Hilfe von unserem Team Dokumentation Anleitungen zu jeder Jetpack-Funktion Feature-Anfragen Request features and vote on ideas Blog Neuigkeiten, Produkt-Updates und Anleitungen
Über uns Suchen
Anmelden Erste Schritte

Blog / Jetpack 101

Where is the PHP.ini File in WordPress? How to Find and Edit its Settings

Avatar von Jen Swisher

Jen Swisher April 27, 2023 · 11 Min. Lesezeit


Auf dieser Seite

  1. What is the PHP.ini file?
  2. When would editing the PHP.ini file be required?
  3. Can all WordPress site owners edit their PHP.ini files?
  4. Where is the PHP.ini file located?
  5. What to do before editing your PHP.ini file
  6. Recommended php.ini values for WordPress
  7. How to open and edit your WordPress PHP.ini file
  8. Security best practices for your PHP.ini file
  9. Common PHP.ini errors & solutions
  10. Frequently asked questions about the PHP.ini file
  11. Locate and edit your PHP.ini file

11 Min. Lesezeit

PHP.ini is an important WordPress file that you can configure to extend your site’s functionality and improve its performance. Although the file is relatively easy to work with, you might not know how to locate and edit its settings.

Fortunately, this straightforward guide can help you easily locate your PHP.ini file in WordPress. Then, you’ll be able to edit and configure it to maximize your site’s performance.

Let’s take a closer look at PHP.ini and show you where to find it. Then, we’ll discuss three ways to edit it and boost your site’s performance. 

What is the PHP.ini file?

WordPress executes several programming languages in the browser, including CSS, HTML, and JavaScript. Additionally, it uses PHP to generate and serve those languages. 

In other words, PHP is the scripting language used by WordPress on the server side of operations. Through PHP, WordPress is able to display all of a website’s content, like blog posts, products, and more.

PHP.ini is the default configuration file for PHP on your WordPress site. You can change its default settings and run applications requiring the PHP scripting language. Overall, it’s a pretty important file when it comes to your site’s functionality and performance. 

When would editing the PHP.ini file be required?

Although PHP is essential to WordPress, it has pretty limited default configuration settings. Fortunately, thanks to PHP.ini, you can override the default values for the following settings:

  • Maximum file size upload. Increasing this limit is ideal if you run a photography website or any other content-heavy site. Since videos and images tend to have large file sizes, editing this setting will enable you to upload heavier clips and photos.
  • File timeouts. When a file takes too long to process, your website will return an error message and stop processing the request. You can increase the number of seconds allowed before your upload times out.
  • Resource limits. You can increase the memory available to upload files and run commands. Plus, if you write long blog posts or add plenty of images to your site, you might increase the maximum post size to accommodate more data. 
  • Maximum execution time. This setting determines the number of seconds a script is allowed to run before it gets terminated by the parser. As such, it helps prevent poorly-written scripts from draining your server.

Essentially, by editing these PHP configurations, you’re able to extend your site’s functionality and improve performance. Additionally, you might also want to edit PHP.ini in WordPress to enable or disable file extensions.

For example, a common error that you may see is „Your PHP is missing the MySQL extension.“ In this instance, editing the PHP.ini file can enable the extension and clear the error message.

Can all WordPress site owners edit their PHP.ini files?

This depends on your server environment and system. Typically, it’s up to your WordPress hosting provider to allow access to the file. If PHP.ini is inaccessible, you may need to contact your host for support and see if they’ll help you edit it. 

Certain hosting types are less likely to give users access to the PHP.ini file. For instance, a shared hosting setup consists of multiple websites hosted on a single server. It’s a great way to reduce costs, but you won’t have root access to your server. 

By contrast, you’re more likely to have access to your PHP.ini file if you’ve signed up for a Virtual Private Server (VPS), dedicated server, or reseller hosting plan. In these setups, you’re not sharing resources with other sites, so you have more freedom to configure your website’s server. 

Fortunately, if you don’t have direct access to the PHP.ini file in WordPress, there are some useful workarounds that can achieve the same results. Let’s take a quick look at two of them:

1. Edit your .htaccess file

Editing PHP.ini can increase your site’s maximum execution time. But if you don’t have access to the file, you can also adjust this setting in .htaccess. 

First, you must access your website files via FTP or File Manager. Then, find the root directory of your site. This is usually labeled public_html. 

Open the .htaccess file and paste the following code into the editor:

php_value max_execution_time = X

Replace the „X“ with an amount of time in seconds. Inserting „60“ will increase the maximum execution time to one minute, giving your website more time to load scripts before terminating the process. 

2. Edit your wp-config.php file

Additionally, you may want to eliminate the run time limit in WordPress. This setting controls the time your site will spend on an operation before timing out. At that point, your site will return an error.

To extend the time limit, locate your wp-config.php file and paste the following code into the editor:

set_time_limit = 60

If the code is already there from work you’ve done previously, simply change the value to 60. You can exceed 60 seconds, but doing so may be risky since the setting is in place to protect your system from poorly-written scripts.

Where is the PHP.ini file located?

By now, you should have a basic idea of the purpose of the PHP.ini file. Now you might be wondering: where is PHP.ini in WordPress? 

If you have a PHP.ini file, you’ll usually find it in the root directory of your WordPress site. If not, you can create a new file for your website, which we’ll show you how to do in the next part of this article. 

There are also different locations if you’re working in a local environment. If you’re a WAMP user, you can locate your WordPress PHP.ini file by right-clicking on the program icon. Then, head to PHP → php.ini.

In XAMPP, all you need to do is open the program and click on Config. Then, find the php.ini option within the menu.

Finally, using Linux, you can typically locate your PHP.ini file in the Loaded Configuration File. To access this, you’ll need to enter the following code below the terminal:

PHP –I | grep "Loaded Configuration File"

You should receive the following output:

Loaded Configuration File => /usr/local/lib/php.ini

If you still can’t find your PHP.ini file’s location in WordPress, it’s time to contact your web host or create your own file. Let’s look at how this process works. 

What to do before editing your PHP.ini file

Before making any changes to your site files, including PHP.ini, it’s a good idea to make a fresh backup of your site. That way, if you make any mistakes, you’ll be able to revert your site to an earlier version in just seconds. 

If you don’t already have a WordPress backup plugin, consider installing Jetpack VaultPress Backup.

Jetpack VaultPress Backup homepage

Not only does VaultPress back up your entire website, but it also stores copies of your database, your site files, and all WooCommerce customer and order data.

Recommended php.ini values for WordPress

The values you choose depend on your site. A simple blog has different needs than a WooCommerce store. Here are up-to-date starting points:

DirectiveSimple BlogWooCommerce/LMSWhat it Does
memory_limit256M512M or higherSets the maximum memory a script can consume. Low values cause fatal errors.
upload_max_filesize64M128MMaximum size for a single uploaded file.
post_max_size64M128MMust be equal to or larger than upload_max_filesize. Governs the total size of all POST data.
max_execution_time180300Maximum time in seconds a script is allowed to run before it’s terminated.
max_input_vars30005000Needed for complex themes with many menu items or page builder options.

How to open and edit your WordPress PHP.ini file

There are several reasons you may want to edit your PHP.ini file. Here are some of the recommended configurations that might be useful:

max_execution_time = 180

memory_limit = 256M

post_max_size = 64M

upload_max_filesize = 64M

max_input_time = 60

file_uploads = On

safe_mode = Off

Adjusting the maximum execution time will increase the time available to execute every script on your site. Essentially, this refers to the time the server needs to run the commands, so it can be handy if you have heavy scripts. 

The memory limit enables you to restrict and expand the memory usage of PHP. Generally, this concerns the memory needed to upload files and run commands on your site. 

Post max size defines the maximum data a post can have. So, if you have plenty of images on your pages or write super long blog posts, you might want to increase this value.

Additionally, you can increase the upload max file size. This is a helpful setting for photographers or other creatives who need to upload heavy media files like videos. 

However, before you can make these edits, you’ll need to locate an existing PHP.ini file or create a new one. Keep in mind that if you’re using shared hosting, you may be unable to follow these steps.

1. Use an FTP client

Using an FTP client is one of the easiest ways to find and access your PHP.ini WordPress file. Once you’ve got a current backup in place, it’s time to connect to your site via FTP. 

If you don’t already have one installed, you’ll need to find an FTP client like FileZilla and download it to your computer.

FileZilla homepage with options to download

Then, you can connect to your site via FTP to access your site’s files. Just enter your FTP credentials to establish a connection (which you can typically get from your hosting provider). 

Once the connection is made, locate the root directory of your site. This is usually labeled public_html or public.

finding the php.ini file in FileZilla

If you have a PHP.ini file, you should see it in this folder. If you can’t find it, you can locate it manually by creating a new PHP file and pasting the following code into it:

<?PHP phpinfo(); ?>

Update the file by saving your changes. At this point, open the file in your browser to identify the correct file path.

Simply type your website’s URL followed by the file name you chose into the search bar. This might look something like this: yourwebsite.com/file-name.php.

This should launch a page in your browser with information about your PHP installation, including the file path for your PHP.ini file. You can find this information within the Configuration File Path or Loaded Configuration File field.

Once you’ve opened the php.ini file, enter your custom directives. You can check out this list of common PHP.ini directives and syntax rules to configure the file correctly.

Finally, save your file! The settings should start taking effect within a few minutes. 

2. Use cPanel

cPanel is a common control panel tool included in many hosting provider dashboards. It’s pretty straightforward and easy to use. 

First, you’ll need to log in to your hosting account and locate the cPanel File Manager. Then, open your public_html folder.

finding the public_html folder in cpanel

Here, you’ll want to look for your PHP.ini file by its name. Note that it might also be hidden, so click on Settings and check the box next to Show Hidden Files (dotfiles).

how to show hidden dot files in cpanel

If you still can’t find it, click on New file and name it „php.ini“. Make your edits, save the file, and your site should start showing the changes within a few minutes. 

Depending on your hosting account dashboard, you may also have access to the MultiPHP INI Editor. This tool enables you to configure your PHP settings from a list of available directives. Keep in mind that the editor is typically only available with VPS, dedicated server, or reseller hosting plans. 

3. Utilize a WordPress file manager plugin

File manager plugins enable you to easily edit your website’s files without playing around on the back end. Therefore, using a plugin is an accessible, quick, and beginner-friendly way to access your WordPress PHP.ini file.

With a file manager plugin, you’ll typically get access to a clean, intuitive interface to manage, upload, download, and even back up and restore files. One of the most popular options is Advanced File Manager.

Advanced File Manger plugin

To edit your PHP.ini file with Advanced File Manager, you’ll need to install the plugin in WordPress. In your dashboard, navigate to Plugins → Add New. Then, search for „Advanced File Manager“ and click on Install Now → Activate.

adding the Advanced File Manager plugin to WordPress

Once the tool has been installed successfully, head to File Manager → File Manager to access the plugin’s interface.

finding the php.ini file using a plugin

You may be able to find PHP.ini within the file list. Otherwise, click on New file and select txt to create a simple text file. You’ll be prompted to name the file, so call it „php.ini“.

Next, select the newly created file and click on Edit file. Then, input your code, along with any custom configurations.

Again, make sure to save your changes when you’re done to finish setting up your WordPress PHP.ini file.

Security best practices for your PHP.ini file

Editing php.ini can boost performance, but incorrect settings can expose your site to vulnerabilities. Before you change anything, apply these security-first rules:

  • display_errors = Off: NEVER set this to ‚On‘ on a live website. Doing so can reveal sensitive server path information to attackers.
  • allow_url_fopen = Off: Keep this disabled unless a specific, trusted plugin requires it. Enabling it can create a vector for remote file inclusion (RFI) attacks.
  • expose_php = Off: This setting tells the server not to advertise the PHP version you are running, hiding a potential target from attackers.

Common PHP.ini errors & solutions

Error: „The uploaded file exceeds the upload_max_filesize directive“

Root Cause: Default 2MB limit insufficient
Quick Fix:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Error: „Fatal error: Allowed memory size exhausted“

Root Cause: Memory limit too low for operations
Quick Fix:
memory_limit = 256M
max_input_vars = 3000
Note: WooCommerce sites typically need 256M minimum, and ideally 512M.

Error: „Maximum execution time exceeded“

Root Cause: Complex operations timing out
Quick Fix:
max_execution_time = 300
max_input_time = 300
Warning: Never set to 0 (unlimited) on production sites.

Frequently asked questions about the PHP.ini file

We’ve just covered the basics of finding and editing your PHP.ini file in WordPress. If you still have any questions, we’ll answer them in this section!

What if I don’t have access to the PHP.ini file? Can I still edit my PHP settings?

If you can’t access your PHP.ini file, you may be able to edit your PHP settings by creating a new PHP.ini file via FTP, File Manager, or a file manager plugin. Keep in mind that this typically isn’t available for shared hosting plans. Alternatively, you can configure some PHP settings using .htaccess and wp-config.php.

Can I create a new PHP.ini file to overwrite my hosting provider’s file?

In some cases, it’s possible to override PHP settings by creating a new PHP.ini file. If this doesn’t work, you’ll need to contact your hosting provider directly. You may need to switch to a different hosting configuration, like VPS or dedicated hosting.

Do PHP.ini changes take effect immediately?

PHP.ini changes often take effect immediately or within a few minutes. If you’ve made edits, but your site’s configuration hasn’t changed, you may be editing the file in the wrong directory.

Can your WordPress site’s PHP.ini file be hacked?

Although it’s not very common, your WordPress website can be hacked via its PHP.ini file. That’s why it’s worth investing in a high-quality hosting provider with strict security protocols, along with WordPress security plugins. 

Locate and edit your PHP.ini file

Editing the PHP.ini file is a great way to extend the functionality of your site and configure its PHP settings. But you might not know how to carry out these changes.

To recap, here are three ways to locate and edit PHP.ini:

  1. Use an FTP client.
  2. Use cPanel within your hosting account dashboard.
  3. Utilize a file manager plugin like Advanced File Manager.

Before you start editing any of your site files, it’s important to back up your site. Jetpack VaultPress Backup backs up all your database tables, website files, and WooCommerce data, so you’ll never lose your content. Better yet, it’s super simple to restore your site if anything goes wrong. 

Like Lade …
Avatar von Jen Swisher

Written by

Jen Swisher

Jen is a Customer Experience Specialist for Jetpack. She has been working with WordPress and Jetpack for over a decade. Before starting at Automattic, Jen helped small businesses, local non-profits, and Fortune 50 companies create engaging web experiences for their customers. She is passionate about teaching others how to create on the web without fear.

Entdecke die Vorteile von Jetpack

Erfahre, wie Jetpack deine WordPress-Website schützen, beschleunigen und beim Wachstum unterstützen kann.

Tarife entdecken

Questions about this post? Ask in the support forum

Teilen


Keep reading.

More from Jetpack 101, newest first.

Alle Beiträge ansehen

Jetpack 101 Mär 31, 2026

WordPress Image SEO: 12 Techniques to Rank Higher & Load Faster

Are images helping or hurting your rankings? What can you do about it? 12 realistic ways to optimize your image strategy for more high-quality traffic.

Avatar von Jen Swisher Jen Swisher 14 Min. Lesezeit

Jetpack 101 Mär 26, 2026

WordPress Site Redirecting to Spam? Here’s How to Fix a Hacked Site

Uncover hidden malware, remove malicious code, and stop spam redirects fast — before they damage your reputation. Secure your WordPress site.

Avatar von Jen Swisher Jen Swisher 12 Min. Lesezeit

Jetpack 101 Mär 24, 2026

WordPress Form with File Upload: How to Create One in 3 Steps

How to create a secure file upload form in WordPress — fast. Add drag-and-drop uploads in just 3 simple steps. Plus, the top tool to keep…

Avatar von Jen Swisher Jen Swisher 5 Min. Lesezeit

Betreibe deine WordPress-Website KI-first.

Free to start, and AI agents are free to connect. Money back within 14 days on yearly plans.

Erste Schritte Jetpack kostenlos holen

WordPress-Plugins

  • Akismet Anti-Spam↗ (wird in einem neuen Tab geöffnet)
  • Jetpack↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Boost↗ (wird in einem neuen Tab geöffnet)
  • Jetpack CRM↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Protect↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Search↗ (wird in einem neuen Tab geöffnet)
  • Jetpack Social↗ (wird in einem neuen Tab geöffnet)
  • Jetpack VideoPress↗ (wird in einem neuen Tab geöffnet)
  • VaultPress Backup↗ (wird in einem neuen Tab geöffnet)
  • WP Super Cache↗ (wird in einem neuen Tab geöffnet)
  • Herunterladen

KI

  • Jetpack AI
  • Skills
  • WordPress MCP

Partner

  • Partnerprogramm
  • Empfohlene Hosts
  • Für Hosts
  • Für Agenturen
  • Für Partner

Entwickler

  • Dokumentation↗ (wird in einem neuen Tab geöffnet)
  • Beta-Programm
  • Jetpack auf GitHub↗ (wird in einem neuen Tab geöffnet)

Hilfe

  • Wissensdatenbank
  • Foren↗ (wird in einem neuen Tab geöffnet)
  • Bewertungen und Erfahrungsberichte
  • Kontakt aufnehmen
  • Über Jetpack
  • Presse
Sprache auswählen Deutsch
  • English
  • Deutsch
  • Español
  • Français
  • 日本語

© 2026 Automattic Inc. Alle Rechte vorbehalten.

  • Nutzungsbedingungen↗ (wird in einem neuen Tab geöffnet)
  • Datenschutzerklärung↗ (wird in einem neuen Tab geöffnet)
  • DSGVO

Mit Sorgfalt erstellt von

Im App Store laden Bei Google Play herunterladen
Lade Kommentare …
  • Rebloggen
  • Abonnieren Abonniert
    Jetpack
    Schließe dich 53.352 anderen Abonnenten an

    Hast du ein WordPress.com-Konto? Melde dich jetzt an.

  • Jetpack
    Kurzlink kopierenBeitrag im Reader lesen
    Abonnements verwaltenRegistrierenAnmelden
    Melde diesen Inhalt
    Diese Leiste einklappen
%d