HowTo: Find, Change Permission, Edit PHP.ini in Google Cloud WordPress Bitnami

We are building a WordPress website using the Google Cloud platform. One of the recommendations is to increase the PHP Max Input Vars value. Increasing the PHP Max Input Vars value is a common recommendation when building a WordPress website to ensure that the site can handle large amounts of data and complex forms.

We will go through the steps in this tutorial on how to do this.

1. Find PHP.ini file

find is a command for recursively filtering objects in the file system based on a simple conditional mechanism. Use find to search for a file or directory on your file system. Using the -exec flag, files can be found and immediately processed within the same command.

Use find from the command line to locate a specific file by name or extension. The following searches for PHP.ini files:

Run find /opt/bitnami -name php.ini

2. Change PHP.ini file permission 

Check the permission using the stat command.

Change directory using cd /opt/bitnami/php/etc

Run stat php.ini

What does chmod 664 mean?

Chmod 664 (chmod a+rwx,u-x,g-x,o-wx) sets permissions so that, (U)ser / owner can read, can write and can't execute. ( G)roup can read, can write and can't execute. ( O)thers can read, can't write and can't execute.

Run chmod 777 php.ini

What does chmod 777 mean?

Setting 777 permissions to a file or directory means that it will be readable, writable and executable by all users and may pose a huge security risk. ... File ownership can be changed using the chown command and permissions with the chmod command.

Remember to change it back to 664 after modifying the file by running chmod 777 php.ini

3. Edit PHP.ini file 

For this case, we will modify PHP.ini using SUDO.

Run sudo nano /opt/bitnami/php/etc/php.ini and add the line max_input_vars = 3000

Run sudo reboot. After the VM reboots, check the System Status and it should be OK.

We are done!

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad