Where is php.ini on a Linux Server?

- by

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.



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

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.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.