![]() |
Wordpress Permission Problem. - Printable Version +- Post4VPS Forum | Free VPS Provider (https://post4vps.com) +-- Forum: Web Technology & Internet (https://post4vps.com/Forum-Web-Technology-Internet) +--- Forum: Web Design & Projects (https://post4vps.com/Forum-Web-Design-Projects) +--- Thread: Wordpress Permission Problem. (/Thread-Wordpress-Permission-Problem) Pages:
1
2
|
Wordpress Permission Problem. - Rehan - 01-06-2019 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. RE: Wordpress Permission Problem. - rudra - 01-06-2019 do run this. might help php -i | grep "Loaded Configuration File" 777 is bad idea. RE: Wordpress Permission Problem. - Pacific Spirit - 01-06-2019 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. RE: Wordpress Permission Problem. - Mashiro - 01-06-2019 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. RE: Wordpress Permission Problem. - humanpuff69 - 01-06-2019 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 RE: Wordpress Permission Problem. - Rehan - 01-06-2019 (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 The plugin installation problem has been solved by these commands. Quote:chown www-data:www-data -R * # Let Apache be ownerBut 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). 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. RE: Wordpress Permission Problem. - humanpuff69 - 01-06-2019 (01-06-2019, 10:56 AM)Rehan Wrote: The plugin installation problem has been solved by these commands. 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 RE: Wordpress Permission Problem. - Rehan - 01-06-2019 (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? RE: Wordpress Permission Problem. - Mashiro - 01-06-2019 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). RE: Wordpress Permission Problem. - Rehan - 01-06-2019 (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. A lot of thanks. ![]() ![]() #HiddenRefugeBestinTheWorld |