0

Just as the question title states, I need to find out what my server FTP credentials are. I am using WordPress to create a website on my Raspberry Pi. When I try to install a new theme, it asks me for my FTP credentials, but I am unsure of what they are.

it asks for:

  • hostname
  • ftp username
  • ftp password

I have tried going into the wp-config.php file to find it, and indeed, the info I used during the WordPress setup is there. I tried this hoping it would work, but it doesn't. It keeps spitting out this error:

failed to connect to FTP Server localhost:21

Here's the info about my current setup:

  • Raspberry Pi 2 B+
  • LAMP Server
  • Wordpress (from wordpress.org)
0

3 Answers 3

3

This issue with Wordpress is usually related to permissions being incorrectly set in the www directory. Running the command sudo chown www-data:www-data /var/www -R should solve the problem.

5
  • @SteveRobillard, my knowledge of how to navigate the RPI is very weak. im more than likely to mess something up pretty bad. it took me 4 days to figure out how to get to where i am now lol
    – WP Issues
    Apr 21, 2016 at 15:41
  • @WPIssues Did you mean to respond to me because you placed your reply under jacobm001 answer. If you meant me what is you question. Apr 21, 2016 at 15:59
  • @Jacobm001, Does that command need to be run in cd /var/www/html or just run it normally as if i just brought up the terminal on the pi?
    – WP Issues
    Apr 22, 2016 at 0:06
  • @WPIssues just run normally. I specified an absolute path.
    – Jacobm001
    Apr 22, 2016 at 0:07
  • ok. im gonna try something real quick and then see if that works.
    – WP Issues
    Apr 22, 2016 at 0:17
1

You can find the hostname of your Pi using the hostname command:

hostname

if the hostname alone does not work try either hostname.local or the IP address, which can be found by running:

ifconfig.

Your username and password are likely pi and raspberry respectively, unless you have changed them.

It may in the end be easier to use the manual installation for plugins and themes. You can just download and extract the compressed file to the correct location.

6
  • This probably has less to do with FTP, and more to do with permission issues in Wordpress's directory.
    – Jacobm001
    Apr 21, 2016 at 15:37
  • @SteveRobillard, oops, i thought i was replying to your comment. i was just saying how it took me 4 days of effort to figure out how to get where i am now with the whole server. i prefer automation as with my limited knowledge, im less likely to mess something up leading to broken code or missing files and such however, i havent left out manual installation. i just shy away from it for the above reason. how do i download the plugins and themes? and how do i extract them to the correct locations? can i do this with ANY theme off the internet? or does it HAVE to be wordpress only?
    – WP Issues
    Apr 21, 2016 at 16:24
  • yes, i have changed my password, but dont know how to change the username, so i left it as is. all efforts to change the username caused multiple rpi crashes, errors, and what not. even creating a new user, changing permissions, and deleting user pi resulted in unsatisfactory results. i have tried to use the ip address as the hostname, but it doesnt work.
    – WP Issues
    Apr 21, 2016 at 16:24
  • @WPIssuesit has to be a WordPress theme to work with WordPress you wouldn't expect a presta cart or magento theme to work with WP would you. A google search for manually install wordpress theme will turn up many results. I don't remember exactly where in the directory structure it goes but it is under the /var/www directory somewhere normally. At this point you have made so many changes that it may be very hard to get it right. You may be better off reimageing the SD card and starting again. If nothing else you have learned some of the things not to do. Apr 21, 2016 at 16:30
  • @WPIssues as this comes from the Pi foundation this should be a good tutorial to follow raspberrypi.org/learning/lamp-web-server-with-wordpress Apr 21, 2016 at 16:30
0

@SteveRobillard and @Jacobm001, thank you for your help!!!

@Jacobm001, your solution worked like a charm. i am adding it to my list of fixes in this process. next time i do another web server, should i just automatically use this command? or should i try installing the theme or plugins first to see if the problem arises? me-thinks i should just go ahead and do it to spare me the headache again, but then again, might it potentially create more problems?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.