Can't install any plugin on Wordpress

I did a clean install of Wordpress. Logged in and all that but when I try to install any plugins, it asks me to put ftp credentials or some kind of permission. Here is the screenshot of the issue.


Screenshot

Hi,

this is a behavior of Wordpress themselves and you would need to install a FTP server. It can be easily done by running dietpi-software and than select ProFTP as File Server

Yes ProFTP is installed, still no luck.

Look here:

https://www.digitalocean.com/community/questions/wordpress-asking-for-ftp-credentials

consig1iere

what is the exact error message you are facing? You just posted a simple login screen but without any error message.

Dietpi fresh convert ;
I experience similar issue with fresh install of wordpress. Have setup basic install on but wordpress can’t write to it’s plugin directory… surely we don’t need to adjust ownership to operate basic functions ? Have added define(‘FS_METHOD’,‘direct’);
to the wp-config to stop it requesting ftp target info which clarifies a permissions blockage…

dietpi@BerryDietPi:/var/www/wordpress/wp-content$ ls -l
total 12
-rw-r–r-- 1 nobody nogroup 28 Jan 8 2012 index.php
drwxrwxr-x 3 nobody nogroup 4096 Jun 10 21:48 plugins
drwxr-xr-x 5 nobody nogroup 4096 Jun 10 21:48 themes

please advise

ok there seems to be something wrong on WP installation. Usually user should be www-data and not nobody . Pls do following on a fresh install

  1. install WP using dietpi-software
  2. reboot system once completed
  3. before opening webside, do following on command line: chown -R www-data:www-data /var/www/wordpress/
  4. opening WP webside on browser and finish initial installation
  5. WP should be able to write down wp-config.php to OS level now

Fixed for v6.32, many thanks!

Thanks for the advice and news of the fix for next release… fab!

could there still be some permission issues ? - In my imported WP blob we can only see home page and no others which could be permalinks error though have tried every suggested fix and alternative ways of migration to similar effect. each page returns 404. If i import same blob to other hosted services, all works just fine… please advise

What do you mean by “imported WP blob”? If you didn’t install it via dietpi-software, recheck the location you placed it. E.g. on DietPi, webroot is /var/www instead of /var/www/html (Debian webservers default).

Hi, by WPBlob means happily set up wordpress in dietpi and logged in then using a plug-in (WPvisit backup) imported a previously exported WP site… and all seemed to go well but can only view the hope page with further pages returning error 404. Similar errors in results often attributed to permalinks issues… but I can import the same backup into other WP installations elsewhere no problems… installation directories all seem to match up ok… but I will certainly double check, thanks

Am still struggling to get imported wordpress posts linked from the homepage correctly with %postname and this does seem to be a permalinks issue as the simple uri works fine though don’t want to rewrite all the urls but resolve this issue if it relates to permissions, fine. have also investigated the rewrite mod for apache2 and this seems active. Also tried basic, save permalinks in WP and attempted customisaition of .htaccess both in the /wordpress and web root.

Are there some DietPi post installation notes I missed somewhere to prepare for installation of the ‘optimised’ apps?

Please advise
thanks James

It sounds like it was installed at the webroot before, so e.g. your.domain.org/post.php?abc are the internal links, while on DietPi every web application has it’s own sub directory, means your.domain.org/wordpress/post.php?abc is the way internal links have to be. When importing an external instance to DietPi indeed that is an issue for all internal links as long as they are no relative to the current page location but absolut to the webroot. You could add some internal rewrite to rewrite all non /wordpress locations to /wordpress or you could change the webroot in you webserver/vhost config to /var/www/wordpress, which is perfectly possible but not that further dietpi-software web application software (which use the port 80/443 webserver) will work OOTB of course. We place every website into it’s subdir by default to allow multiple software running concurrently on the same webserver :wink:.

permalink issue aside, further testing on our test rig reveals that there are write issues preventing upload of media and authoring of posts. I am reluctant to meddle with permissions as I don’t have a good grip on that stuff. am I missing something… have similar difficulties with other apps in the library picture gallery doesn’t show it’s images… so is that a read permission adrift? We are running Dietpi on Berryboot at http://berrydiet.digitalmarkers.net

Up till this year I was trying to keep the MAZI project on track and useful but it hasn’t been supported by developers since and of 2018 when funding ceased. There are a lot of groups out there seeking a stable maintainable solution to continue with offline and proximity hosting projects, they got used to the idea of integrated hotspot and publishing services on the PI so sorting these points with WP would open DietPi up to many of them.

thanks James

In case of Wordpress: It runs on the regular webserver hence with user www-data. So be sure that the directories your are uploading to are owned by this user or it has write permissions via group membership. In case of Wordpress chown -R www-data:www-data /var/www/wordpress/ would usually cover it, but probably your instance is set up a bid different.

In case of the image gallery, it requires read access only. Strange is that on the parent directory is says “No image in gallery” but when you enter the directory, the images are there :thinking:.

HIya,thanks for getting back to me
yes, looks correct for our WP directories eg.

drwxr-xr-x 12 www-data www-data 4096 Oct 24 10:12 wp-content

it’s a test installation so happy to offer you access to poke about… I imaging you local version would behave in similar way as it’s standard install just with an imported WP dataset

as for the image gallery, yes I can activate admin mode and upload images etc. but they will not display and the stock images also do not display… ?

I’ll do a test install of the image gallery to see if this is a general issue.

how did your test go? am hanging here on your comments. Still hoping to be able to upload files to wordpress as this is currently not possible on any of the dietpi installations I have tried so far.

Found it, PHP requires write access to the cache dir:

chown www-data:www-data /var/www/gallery/_sfpg_data