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.

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

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!