In this tutorial I will show you how to create a php.ini file via FTP.
Every installation of PHP comes with default settings which are usually fine for most websites. Occasionally, the needs of a website makes it necessary to adjust these PHP settings. Creating a php.ini file is the solution to adjust the PHP settings for your website.
You can create a php.ini file using an FTP client, or by logging into the server via SSH, however creating a php.ini file is easier using an FTP client. This article uses Filezilla as the FTP client.
Adding a php.ini file through Filezilla
- Log into your web server via FTP. Visit the following article for detailed instructions:
- Make sure you’re in your user’s directory.
- You can see this in Filezilla in the ‘Remote site:’ field. It will say “/home/username”.
- In the user’s directory, click into the .php directory which should already exist.
- In the .php directory you will see several folders for the different versions of PHP. Click into the version your site is running. Remember to first check which version of PHP your site is using. In this example, we’ll assume the site is using PHP 7.2.
- In this directory you’ll see a php.ini file.
- Right-click on the php.ini file, and then choose View/Edit.
- Enter any of your customizations below that line.
- When you try to save this file in Filezilla, the pop-up box will open.
- Check the box which says ‘Finish editing and delete local file’, then click the Yes button to save.