Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 22103  / 1 Year ago, sun, april 30, 2023, 11:28:16

I'm using amazon web services to host my Ubuntu Lamp stack and I'm new to this (of course).



I installed LAMP and wordpress to use for my website using this tutorial:



http://iampuneet.com/wordpress-amazon-ec2/



I have completed this and everything seems to be running smoothly. I have access to the wordpress dashboard and I am attempting to upload a theme I purchased. Now when I go to upload the theme I get this error:



The uploaded file exceeds the upload_max_filesize directive in php.ini.


So I'm trying to add a php.ini file that increases the max upload size, however when I try to move the file into the /var/www/wp-admin directory I get this error:



Error:  /var/www/wp-admin/php.ini: open for write: permission denied
Error: File transfer failed


I am using an EC2 instance on AWS, Host: my ip address, Username: ubuntu, no password and port 22



Any idea what may need to be done here? I have tried numerous ideas from Googling this issue.


More From » aws

 Answers
7

Even as the ubuntu user, you cannot write to a directory owned by root.



If you want to do this, you will first have to upload your files to your home directory (i.e. /home/ubuntu/).



From there, you need to SSH into your system, login, then do sudo cp /home/ubuntu/FILENAME /var/www/wp-admin/FILENAME or whatever the command you need to do is, replacing FILENAME with the actual file's name. As well, if you are not copying to /var/www/wp-admin remember to use the correct path instead.


[#29595] Sunday, April 30, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
assionortly

Total Points: 423
Total Questions: 121
Total Answers: 115

Location: Chad
Member since Wed, Sep 30, 2020
4 Years ago
;