arrow_upward

Pages (2):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wordpress Permission Problem.
#1
Hey Friends, I hope all of you are fine.I am facing some problem during installing plugins/theme at a wordpress site.I have install wordpress on my VPS.When i try to upload theme it shows that " The link you followed is expired. " According to the google search i found that this is a problem due to the Upload Size limit.I found that i should increase that in php.ini file.I have searched the whole VPS.I am unable to find the php.ini.
I found that size can be increased by installing a plugin.When i tried to install a plugin it shows " Installation failed: Could not create directory."

I searched the google and found that i should change the permission.I have tried changing the permission but still unable to create.
sudo chmod 777 /var/www/html/wordpress
change to 755 as well.

Thanks to Post4VPS and Hostlease for their great services.  
#2
do run this. might help
php -i | grep "Loaded Configuration File"

777 is bad idea.
Sincere Thanks to VirMach for my VPS9. Also many thanks to Shadow Hosting and cubedata for the experiences I had with their VPSs.
#3
Firstly go and login to your SSH, then use the following command: nano /usr/local/lib/php.ini - Activate the and find the feature by pressing crtl+W and then entering desired setting, the interface will scroll to that setting. In mine case, I've searched for post_max_size. The setting to your desired configuration then changed the post_max_size setting to 16M. Alter the setting to your desired configuration. You can changed the post_max_size setting to 16M, exit the editior and the SSH.
#4
Setting permission through chmod is often not enough when working with web servers. For things to work properly you have to change ownership of all the files in /var/www to the user and group that is used to run the web server services. Usually (this highly depends on the OS though) the user and group is www-data (99% of all Debian and Ubuntu based distros have this user for that purpose).

So long story short: adjust file ownership also instead of only using chmod. To do that you can use the chown (change owner) command. Syntax: chown -R user:group /path/to/filesorfolders. -R stands for recursive to apply it to all sub folders and files. An example: chown -R www-data:www-data /var/www

Once that is done there is even no need for the dangerous chmod 777.
[Image: zHHqO5Q.png]
#5
Chmod and chown should fix the problem . chown to www-data or add yourself to www-data group

If you use hosting you probably not encounter this issue but try chmod 777 the file that asked for permission . Because the cms in this case wordpress probably need the permission
Terminal
humanpuff69@FPAX:~$ Thanks To Shadow Hosting And Post4VPS for VPS 5
#6
(01-06-2019, 10:52 AM)humanpuff69 Wrote: Chmod and chown should fix the problem . chown to www-data or add yourself to www-data group

If you use hosting you probably not encounter this issue but try chmod 777 the file that asked for permission . Because the cms in this case wordpress probably need the permission

The plugin installation problem has been solved by these commands.
Quote:chown www-data:www-data  -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--
But i still have the theme installation problem.I have changed the max file upload size via a plugin but that is useless.It is not working.Still searching for the solution.

(01-06-2019, 09:42 AM)Hidden Refuge Wrote: Setting permission through chmod is often not enough when working with web servers. For things to work properly you have to change ownership of all the files in /var/www to the user and group that is used to run the web server services. Usually (this highly depends on the OS though) the user and group is www-data (99% of all Debian and Ubuntu based distros have this user for that purpose).

So long story short: adjust file ownership also instead of only using chmod. To do that you can use the chown (change owner) command. Syntax: chown -R user:group /path/to/filesorfolders. -R stands for recursive to apply it to all sub folders and files. An example: chown -R www-data:www-data /var/www

Once that is done there is even no need for the dangerous chmod 777.

A lot of thanks.You are right the plugin installation problem has been fixed by chown.But still facing the theme installation problem.In past i fixed that theme installation problem by increasing the size from a file.I don't remember.But i am unable to find now.

Thanks to Post4VPS and Hostlease for their great services.  
#7
(01-06-2019, 10:56 AM)Rehan Wrote: The plugin installation problem has been solved by these commands.
But i still have the theme installation problem.I have changed the max file upload size via a plugin but that is useless.It is not working.Still searching for the solution.


A lot of thanks.You are right the plugin installation problem has been fixed by chown.But still facing the theme installation problem.In past i fixed that theme installation problem by increasing the size from a file.I don't remember.But i am unable to find now.

try changung the max upload from the php.ini instead , it should located on /etc/php . Or you can force add it on your nginx/apache config
Terminal
humanpuff69@FPAX:~$ Thanks To Shadow Hosting And Post4VPS for VPS 5
#8
(01-06-2019, 11:13 AM)humanpuff69 Wrote: try changung the max upload from the php.ini instead , it should located on /etc/php . Or you can force add it on your nginx/apache config

Bro i have searched for the file. There are 3 folders in /etc/php/7.1/

apache2  cli  mods-available.

and every folder have a php.ini file. with some codes starting with " : " What should i do? Simply add those lines at the end or what?

Thanks to Post4VPS and Hostlease for their great services.  
#9
The correct corresponding php.ini configuration file for Apache 2 should be /etc/php/7.1/apache2/php.ini in this case. If you use nano you can use CTRL + W to start a search and find the parameters to increase size, edit them and save the file.

As far as I remember everything starting with ; or : is a comment. So if the parameter for the size is commented make sure to remove the comment sign or the otherwise the change to it won't be applied as comments are ignored. Alternatively you can add the parameter yourself anywhere in the file (at the end probably the best option to be sure).
[Image: zHHqO5Q.png]
#10
Smile 
(01-06-2019, 12:01 PM)Hidden Refuge Wrote: The correct corresponding php.ini configuration file for Apache 2 should be /etc/php/7.1/apache2/php.ini in this case. If you use nano you can use CTRL + W to start a search and find the parameters to increase size, edit them and save the file.

As far as I remember everything starting with ; or : is a comment. So if the parameter for the size is commented make sure to remove the comment sign or the otherwise the change to it won't be applied as comments are ignored. Alternatively you can add the parameter yourself anywhere in the file (at the end probably the best option to be sure).

A lot of thanks.   Heart  Angel   Problem has been solved theme has been successfully uploaded.I have updated the php.ini from the /etc/php/7.1/apache2.Everything is working fine for now.Thanks Again.I can not express my feelings.

#HiddenRefugeBestinTheWorld

Thanks to Post4VPS and Hostlease for their great services.  
Pages (2):


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
18,110
07-16-2020, 01:22 PM
Last Post: Amresh
2,905
11-29-2019, 04:03 PM
Last Post: xdude
9,417
07-16-2018, 01:36 PM
Last Post: deanhills

person_pin_circle Users browsing this thread: 2 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting