Search code examples
wordpress.htaccessamazon-ec2amazon-rdsamazon-linux-2

Plugin upload error on wordpress hosted on AWS linux 2 (EC2 instance) connected with AWS RDS database


I am trying to upload plugin and theme on EC2 instance running on AWS Linux 2 connected with AWS RDB instance (MySQL). I exactly followed these steps presented by AWS. Creating a MySQL Database with RDS: Configure the RDS database to allow access to specific entities. Creating an EC2 Instance: Create an EC2 instance to run your WordPress site. Configuring Your RDS Database: Configure the RDS database to allow access to specific entities. Configuring WordPress on EC2: Install the WordPress application and dependencies on the EC2 instance. Reference: AWS LINK FOR TUTORIAL

However, I am not able to upload plugin or theme, it shows this error:

WordPress error upon upload

I tried to fix this error using various recommendation, but unable to fix it. The file size in media library is only 2 Mb. wp admin panel

1.wpbeginner

I am unable to find .htaccess or php.ini file on wordpress as recommended by wpbeginner.

2.wpkube

I tried to create new files (.htaccess and php.ini) recommended here and uploaded at this directory: /var/www/html This doesn't help to increase Maximum upload file size.

Could someone please help to resolve this issue?


Solution

  • you can edit the file in amazon linux -

    vim /etc/php.ini 
    

    for upload max size to 100M after you must restart apache and php so

    # sudo systemctl restart php-fpm
    

    then you can check your phpinfo