Best way for users to manage files on Wordpress
February 18, 2018 6:20 AM   Subscribe

I'm building a Wordpress site for a local company and it will feature a PDF price list which will be updated every quarter or so. What's the best way of allowing them to upload the new file through the dashboard without sending it to me and still have the link on the Home Page work? Additional complication is I would like to directly link to the PDF so it is viewable in the browser, not have the file automatically download.

This seems like something that should be easy to sort but I'm struggling. The button on the Home Page simply says Price List and links to /uploads/price-list.pdf and I need that to link to the latest version of the PDF - and I want them to upload the file when they need to.

If I use the basic Wordpress media library then they will have to delete the existing file and upload the new one with exactly the same file name for the link on the Home Page to still work.

I've looked at download manager plugins and most seem to work in precisely the way I want as in I can create the Price List item which a user than can then edit at a later date to change the file it points at (without the source file having to have the same file name).

The problem is that when clicked on from a page, the file automatically downloads and I want it to open in the browser. Most other download managers seem to work in the same way and do not easily allow direct opening of the file itself in the browser - so if it's not a download manager I want - what is it?
posted by jontyjago to Computers & Internet (8 answers total) 1 user marked this as a favorite
 
Best answer: Name the file something clear and short like pricelist.pdf and use a plugin to replace it in the Media Library with a file of the same name - that should mean the link won’t need to be changed and all the internal references in the WP database will be updated: https://wordpress.org/plugins/enable-media-replace/
posted by annathea at 8:02 AM on February 18, 2018 [1 favorite]


The issue of the pdf downloading instead of opening in the browser is a client side issue - users can choose to set their browsers to download PDFs or to open them in the browser window. You don’t have true control over that as a developer.
posted by annathea at 8:04 AM on February 18, 2018 [1 favorite]


If I use the basic Wordpress media library then they will have to delete the existing file and upload the new one with exactly the same file name for the link on the Home Page to still work.

I’d there a reason this isn’t an option? I manage a Wordpress CMS and have various colleagues who update very specific parts of it. They have their own login, I teach them the specific steps they have to take to do their updates, job done. I’ve never had any of them stray beyond that and wreak havoc over the rest of the site.
posted by penguin pie at 8:46 AM on February 18, 2018


(Oh, and seconding what annathea says about how pdfs open).
posted by penguin pie at 8:47 AM on February 18, 2018 [1 favorite]


I just want to emphasise that plugins are poor choices to replace simply learning how to use the WP backend. One could also learn how to FTP the replacement file, easily, and quickly.

But I get it; People don't. And they just keep writing me checks to do these super simple things.
posted by humboldt32 at 10:18 AM on February 18, 2018 [3 favorites]


Does it have to live on their server? What about uploading it to Google Drive and making it viewable by anyone, and then point your link to it there. When they need to upload a new one, if they drag it to Drive with the same name, it will ask them if they want to overwrite the last one or keep separate. I use this to send files to various folks in my job, knowing that whenever they finally click on it, they'll always get the up-to-date version.

Added benefit - Drive will open it as a preview and there's an additional click to download. Just means you have to direct them away from your website for it.
posted by web-goddess at 6:16 PM on February 18, 2018


Replace Media File plugin. It’s called something like that.

Caveat: it does not play well with Wordpress’ CDN, if you’re using that. It may not play well with other CDNs either. Test before comitting to it.
posted by egypturnash at 6:48 PM on February 18, 2018


I just installed Download Monitor, search for 'download-monitor', and it works great.
It gives the file an id and you add a shortcode to the page you want.
then you can update the file from within the Download Edit area, deleting the old one and updating it with a new one. That way your files can have date specific names for internal tracking.
And, as a bonus, you get to track, by IP Address, all the downloads!
posted by drinkmaildave at 12:57 PM on February 20, 2018


« Older Need a book to learn Jazz/Blues piano...   |   Charging an Electric Car With Long Cord Newer »
This thread is closed to new comments.