Bitnami wordpress php ini location

Recently at least starting with WordPress 5.7.1 version of the Lightsail blueprints Bitnami has started to change the way their systems are configured and deployed. They have been mentioning this change in many of their online documentation articles and seems like Lightsail blueprints are now starting to see them. So In this quick video I wanted to go over the changes that you will need to know for managing Lightsil WordPress instances, so without further ado let’s get started.

  1. WordPress installation
    1. The new installation path for the WordPress files is located at:
      1. /home/bitnami/stack/wordpress
  2. The WordPress Content folder
    1. The WordPress content folder and the wp-config.php file have been moved. Now they are located at:
      1. /bitnami/wordpress/wp-content
      2. /bitnami/wordpress/wp-config.php
  3. The WordPress application configuration folder
    1. WordPress configuration files are now in the Apache VHOSTS folder
      1. /opt/bitnami/apache2/conf/vhosts/
  4. Bitnami Helper Tool is no longer installed.
    1. This was a helper program that allowed you to quickly run other Bitnami tools like Cert generation.
    2. The cert tool is still available.
  5. Bitnami Banner removed
    1. The pre-installed banner that displayed on all WordPress sites is now removed and so we no longer need to run the Bitnami Banner Removal Tool.
  6. Run this following command on your SSH Terminal to identify which System your Instance is configured with:
test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A. Using system packages." || echo "Approach B. Self-contained installation."

The output of the command indicates which approach (A or B) is used by the stack. You can use this information as a guide to identify the appropriate paths, configuration and commands to use in our documentation.

Bitnami Documentation for more information

All videos tutorials on the website as well as the YouTube channel aim to provide a simplified process for a specific scenario; there could be many different factors and unique use cases you may have. The tutorials may not cover every situation; so treat is as a starting point or learning concept to apply to your unique situations, and consider this inspiration but not prescription or explicit direction.

Recently, I had to change the value of max_input_vars in php settings due to a requirement from a WordPress plugin. My site is running on EC2 server, installed by bitnami. Followed by the instructions, I went to /opt/bitnami/php/etc and edit the file php.ini.

I successfully located the line max_input_vars. Sure enough, that line was commented so the settings take its default value, 1000. I uncommented that line and set the limit to 3000.

Finally, I saved the file and restart apache.

However, still no luck. I tried to find other places where this settings could be set. After a while, I couldn’t find any other places.

What is the solution?

The solution is to run this script:

sudo /opt/bitnami/ctlscript.sh restart php-fpm

And you can guess, the limit was increased.

Conclusion

It seems that when you make changes in php.ini, you need to restart php-fpm, not apache. The system I’m working on, as mentioned at the beginning of the post, is EC2 and managed by bitnami.

I want to upload large files onto my Amazon Lightsail Bitnami WordPress instance. How can I increase the default file upload limit on my instance?

Short description

Upload_max_filesize is the maximum size of an uploaded file. This is the limit for a single file. Post_max_size, on the other hand, is the limit of the entire body of the request. It's a best practice that you set the post_max_size to be greater than or equal to upload_max_filesize.

By default, WordPress limits uploads to 40 MB for both post_max_size and upload_max_filesize.

To verify the maximum upload limit on your Lightsail instance, run the following commands:

# grep -i "upload_max_filesize" /opt/bitnami/php/etc/php.ini
upload_max_filesize = 40M

# grep -i "post_max_size" /opt/bitnami/php/etc/php.ini
post_max_size = 40M

Resolution

To modify the maximum upload size, do the following:

1.    Open the /opt/bitnami/php/etc/php.ini file to increase upload_max_filesize and post_max_size. Use a text editor, such as the vi editor to access the /opt/bitnami/php/etc/php.ini file.

# sudo vi /opt/bitnami/php/etc/php.ini

; Maximum size of POST data that PHP will accept.
  post_max_size = 64M

; Maximum allowed size for uploaded files.
  upload_max_filesize = 64M

2.    Press the i button to edit the values. After modifying the values, save the file by pressing the ESCAPE button. Then, enter the command :wq!

3.    Verify that the LimitRequestBody parameter is specified in the Apache configuration files using the following command:

# grep "LimitRequestBody" /opt/bitnami/apache2/conf/httpd.conf

If the parameter isn't specified, then there is no size restriction in the Apache web server configuration limits. However, if the parameter is specified and the value is less than the desired upload size, increase the parameter by doing the following:

Where is my PHP PHP ini configuration file located?

ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits. This file is located on your server in the /public_html folder.

Where is Apache PHP ini?

Apache. On Apache, php. ini is usually located in /etc/php/8.1/apache2/php.