Why is FTP necessary when…
-
I don’t know how to exactly put this, so bear with me. I’m missing something, and I don’t know where to get this info.
Why is it when I want to upload a file, I’m required to use an FTP server, when, the file that I just uploaded to via the “Upload” function when adding plugins, is THE server I want the plugin on? If the form upload was successful, why is WordPress asking me for an FTP site to upload to when I want the upload to exist and run ON that site?
I will NOT run an FTP server on that machine. There is absolutely NO need to do so.
This machine is sitting here, with me, in my basement, not with cpanel, not with additional tools you’d see on other web hosts.
I’d rather set 777 than install FTP. ??
-
Ok.
I will NOT run an FTP server on that machine. There is absolutely NO need to do so.
Fine.
Useful information. Thanks. *eyes roll*
You got a sarcastic response because in order to install WordPress to a server you (to put it simply) need to use an FTP client that connects to an FTP server running on your machine (which is usually housed in a datacenter). If you want to run a local copy of WordPress, use mamp ( https://www.mamp.info/en/index.html ). That way the actual folders and files in them, when saved, will be processed by a browser pointed at localhost as if you had uploaded them with an FTP client to a remote server.
Thank you.
I don’t need MAMP or WAMP either. I’m running actually running LAMP on a separate machine (Actually a VM) to which I have full control over. I have samba shares, I’ve got a shell, I’ve got physical access to the machine to do what I want with. As you said, my setup isn’t typical for most people as they outsource their hosting.
So the question still remains that if I have a ?AMP server running, why is WP asking for FTP creds when it should be allowed to process info locally?
I checked in the wp-content/uploads (I think) and the file does make it there. It is created, it is valid, it isn’t written as a 0-byter. But it seems that once the file is received, it wants to FTP it to itself? How do I get it to skip the FTP thing entirely and get it to do the actual processing? Skip step 2 of a 3 step process basically.
I don’t need MAMP or WAMP either. I’m running actually running LAMP on a separate machine (Actually a VM) to which I have full control over. I have samba shares, I’ve got a shell, I’ve got physical access to the machine to do what I want with. As you said, my setup isn’t typical for most people as they outsource their hosting.
@pontiac76
Hmm I don’t really know Linux but I would check your wpconfig file to make sure that the FTP information is entered correctly. It may be in the Database wrong somewhere too but I would think that would prevent everything from working if it were true. If you have your LAMP setup working correctly, I don’t think you need FTP. At least you don’t when installing plugins and uploading files (like images) to your posts when using MAMP.No disrespect, but either I’m still missing out on the reason that I’m being forced to enter credentials I don’t need for a service that doesn’t exist on the machine, or, you’re not quite getting what I’m getting at.
I don’t want, and definitely don’t have any need for an FTP server/service when WP is sitting on the machine that is HOSTING WP. Since there is no FTP service on the machine, there is no way for WP to push the file, so the fact that I’m being forced to provide credentials to something that doesn’t exist on that box, I should be able to use the method used by the simple HTML FORM processing. The server physically GETS/RECEIVES the file with the UPLOAD form already provided by WP. The file literally does GET to the server. Why would WP want to FTP it somewhere else?
Why would I want to FTP something locally? I’m not sending this file outside that computer.
I’ll see if I can find anything in the configuration files, but I’m sensing that there is something else going on.
Why would I want to FTP something locally? I’m not sending this file outside that computer.
You’re right. You wouldn’t. However the ftp direction is in. Not out. You’re asking wordpress to automatically move files from the web – that’s where themes, plugins, and upgrade are coming from – into your server (via ftp).
You may want to brush up on http, ftp(s), SFTP and SSH protocols, and how they (work) differ from each other. Solutions for you, might be…
..download your files directly to your linux desktop under the user name your web files are owned by, and copy them to where they belong. Creating a symlink from your wordpress directory to your user home directory really makes this easy, and removes “sudo” related ownership errors by allowing you to place files in the wordpress directory that are already owned by the correct user account.
Or, if your linux VM is a headless install, and you’ve already installed the OpenSSH server and your VM Host happens to be Windows, WinSCP is an excellent option. Then you can do everything right from any Windows desktop on your own network. Very visual, very fast, pretty easy.
[edit]
I checked in the wp-content/uploads
That directory, is not intended for themes or plugins. You can in fact, upload media to this directory using the browser or flash based interface that is present in WordPress dashboard. This is the directory where anything you upload while creating content will land. Images, video, etc… media to be used for blog content. I don’t believe you should ever get a request for ftp credential when uploading media.
If you’re complaining about what i think you’re complaining about, theres no need to get so hot & bothered; There’s an explanation here: https://www.chrisabernethy.com/why-wordpress-asks-connection-info/
@claytonjames:
Your first paragraph has the wrong assumption. I am NOT talking about CuteFTP, FileZilla, or any other CLIENT. Technically FireFox is my file transfer client, and firefox is what is transferring the files. It is WP directly asking me through the web interface, after I upload the file, what the FTP credentials are.Here is my procedure:
From within the web based admin tool of WP, I go to:
Plugins>
Add New>
Upload>
Browse>
Select file sitting on my local system (Be it my windows machine at home, or my linux machine here at work) and OK the dialog>
Click Install Now.WP then asks me for the FTP credentials. At this point, I’ve already provided WP the file I want to install. Its there on the server. It exists on the server. WP has its claws on it. I’ve watched a large file get sent and watched the file size go up on the server. It is here AFTER the file is transfered to the server that I’m asked FTP credentials and everything grinds to a halt to installing the plugin.
I know all about the protocols. Nothing to brush up on it. I deal with these protocols daily, both at home and at work. FTP, Web, RDP, SCP, RSYNC, DNS, Telnet, SSH, etc, etc.
Although my server does have OpenSSH installed, I also have Samba setup and working, I have a VPN open right to the rest of my network at home so I can transfer files back and forth.
@tasty.donuts:
You were correct with editing the wp-config.php, but there was no documentation found within this file to guide me in the right direction. So I started poking around at the other source files, looking for the word FTP. I found wp-admin/includes/file.php showing that if I adddefine('FS_METHOD','direct');
to the config file, everything should work. I just tried it, and with a few file permission changes, everything is NOW running as expected, without ANY kind of credentials.@cubecolour:
That explains why, but it doesn’t explain the reasoning behind why after an upload, the FTP creds are asked. If I’m being asked to upload something, and it successfully goes, it should say"Hey, I can't write here. Mind giving me another method to get the file over?"
Even then it doesn’t explain to me why WP is asking for credentials to get to itself. File permissions are one thing, yes, I concede to that. But that particular interface is confusing and annoying and frustrating, if you hadn’t noticed by the inflection of my writing. ??@all
None the less, my problem is solved. Thanks for assists.Your first paragraph has the wrong assumption. I am NOT talking about CuteFTP, FileZilla, or any other CLIENT. Technically FireFox is my file transfer client, and firefox is what is transferring the files
Ahhhh, No. Neither am I, friend. Glad you found a solution that works for you.
I know all about the protocols. Nothing to brush up on it. I deal with these protocols daily, both at home and at work. FTP, Web, RDP, SCP, RSYNC, DNS, Telnet, SSH, etc, etc.
And I admire the depth of your education.
Best wishes. ??
Now that I understand that you were already attempting to upload from a local source.. Hell, yeah. Nice fix. The only thing I don’t care for is the relaxed permissions required on the themes and plugins directories to complete installation. ( and that the uploaded files are owned server:server, instead of username:server. )
@pontiac76
You’re very welcome.
- The topic ‘Why is FTP necessary when…’ is closed to new replies.