Where is php.ini on a Linux Server?

By default, it’s located in /etc/php.ini

In this file, you can set your upload limits, memory limits, safe mode and many other settings that you may wish to change.

Before saving permanent changes to this file please consider the following:

  • CREATE A BACKUP before saving
  • all changes will be live AFTER REBOOTING your machine
  • all changes are applied SERVER WIDE to all accounts and sites on your server

If you would like to make changes to a specific directory, consider making changes in your .htaccess files.

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.

3 thoughts on “Where is php.ini on a Linux Server?

    1. Hi Sam,

      TextEdit (Mac), Notepad or Write (Windows) should do the trick. Don’t use things like Word or Pages – they save additional formatting that we don’t want in a .htaccess file. Also, make sure you transfer the file in binary mode with your FTP client.

Add your voice!