Giter VIP home page Giter VIP logo

Comments (9)

jimmyjuarez avatar jimmyjuarez commented on July 30, 2024 2

@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:

  • memory_limit
  • post_max_size
  • upload_max_filesize
  • max_input_time
  • max_execution_time

I would be interested to see if there are others that I am missing...

from aws-refarch-wordpress.

darrylsosborne avatar darrylsosborne commented on July 30, 2024 1

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.

from aws-refarch-wordpress.

RGuilfoyle avatar RGuilfoyle commented on July 30, 2024

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.

from aws-refarch-wordpress.

darrylsosborne avatar darrylsosborne commented on July 30, 2024

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

from aws-refarch-wordpress.

lfreneda avatar lfreneda commented on July 30, 2024

@jimmyjuarez how did you end up increasing this number?

from aws-refarch-wordpress.

jimmyjuarez avatar jimmyjuarez commented on July 30, 2024

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

from aws-refarch-wordpress.

jimmyjuarez avatar jimmyjuarez commented on July 30, 2024

@darrylsosborne YES, that would be great! Are there any other parameters that can be included as Best Practice for tuning WordPress servers?

from aws-refarch-wordpress.

darrylsosborne avatar darrylsosborne commented on July 30, 2024

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.

from aws-refarch-wordpress.

lfreneda avatar lfreneda commented on July 30, 2024

@darrylsosborne that would be awesome! :D @jimmyjuarez just listed all needed configurations for wp that people usually deal with;

from aws-refarch-wordpress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.