Closed jimmyjuarez closed 6 years ago
I believe this is a standard php.ini setting and we have not changed the default. I appreciate that many themes, plugins etc will be larger than this. I'll investigate changing the default, as the php.ini file in stored on each instance it is not something that can modified post-deployment as newly launched instance would not have the correct setting.
Jimmy. This is a standard php.ini file that we don't want to change within the reference architecture. If this configuration is desired in your environment, please make the customization post-deployment. Thanks - Darryl
@jimmyjuarez how did you end up increasing this number?
Step 1: Download your EC2 keypair (.pem file) on you local machine;
Step 2: Launch the Bastion Host EC2 > Auto Scaling > Auto Scaling Group, set Desired, Min, and Max to “1”, the Bastion Host will launch automatically;
Step 3: Open console/terminal, key in the following commands:
Step 4: Load Keypar
$ ssh-add -K /[your-keypair-path]/[your-keypair-file].pem
Step 5: SSH into Bastion Host
$ ssh -A ec2-user@[EC2 Bastion Public DNS (IPv4) IP]
Step 6: SSH into Web Server
$ ssh -A ec2-user@[EC2 Web ASG Private DNS IP]
Step 7: Open php.ini
$ sudo vi /etc/php.ini
Step 8: Edit “Upload Max File Size” parameter (upload_max_filesize = 90M)
Step 9: Restart Apache
$ sudo service httpd restart
Step 10: Reset the Auto Scaling Group and Terminate Bastion Host
Another approach is to use SSH agent.
1) Change the minimum and desired instance count of the Bastion ASG to 1. 2) Follow the instructions on this blog to setup and use SSH agent - https://aws.amazon.com/blogs/security/securely-connect-to-linux-instances-running-in-a-private-amazon-vpc/ 3) SSH to the bastion host using "ssh -A ec2-user@<EC2-PUBLIC-DNS-NAME" 4) From the bastion host, SSH to the web instance using the private ip. Copy the "Connect" command from the EC2 Mgmt Console for the web instance and execute it on the bastion host. 5) Change the settings in the php.ini file and restart.
Question... would you like to include this setting as a CloudFormation parameter? Basically overriding the PHP default setting.
@darrylsosborne YES, that would be great! Are there any other parameters that can be included as Best Practice for tuning WordPress servers?
Please send me the parameters you'd like to adjust and I'll investigate how we can work this into the template(s) as parameters.
@darrylsosborne Thanks! I am not a WordPress or PHP or Server expert, but it seems that these are common parameters that need to be adjusted:
I would be interested to see if there are others that I am missing...
@darrylsosborne that would be awesome! :D @jimmyjuarez just listed all needed configurations for wp that people usually deal with;
Please Increase Default "upload_max_filesize" Parameter