WordPress comes with 2MB upload size limit by default which needs to be increased if you want to upload files larger than that amount. The limit is set by your hosts php.ini file.
Login to your VPS via SSH and change your upload_max_filesize to something bigger such as 10Mb.Β
You can customize this script to suit your needs:
#!/bin/bash -ex
#change the path an create a variable or hardcode it below.
#phpfilepath=/etc/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 200M/' /etc/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 200M/' /etc/php.ini
Restart your Apache2 or Nginx services.
Check php info or login to WordPress and test it.
π Join the DevOps Dojo! π
Are you passionate about growth, learning, and collaboration in the world of DevOps? The DevOps Dojo is your new home! Whether you’re just starting out or looking to refine your skills, this vibrant community is here to support your journey.
π§ What You’ll Get:
- Access to expert-led discussions
- Hands-on learning opportunities
- Networking with like-minded professionals
Ready to take your DevOps game to the next level? Click below to learn more and join the community!
π Join the DevOps Dojo Today
Letβs build, grow, and thrive together! π