Uploading unpermmited filetypes for virtual products on woocommerce - wordpress

I would like to sell an eBook on my website. I'm using WordPress and the shop uses woo commerce, which I just switched over to.
The problem is, the eBook comes in a folder, which is not so simple to upload and sell. If I upload an .exe file, I get the message "Sorry, this file type is not permitted for security reasons" and there are certain files in the eBook folder which generate the same error.
I can use WinRAR or similar to compress it and then upload it that way, but I can't assume my users will have the technical ability to know what to do with it once downloaded.
The alternatives I came up with:
I have an install (.exe) file which is easy to download and use - it simply extracts everything and leaves shortcuts.
Ideally I would like to upload the entire folder and have the user be able to download the whole thing at once but, even if I could upload it, it doesn't seem possible to select an entire folder but only individual files - I would be really grateful if someone knew of a way to do this!
I'm yet to find a workable solution so any help would be much appreciated.
Edit: Should have added this is for interactive eBooks, not a simple pdf, unfortunately.

You are hitting WordPress' internal restrictions on file / mime types for adding anything to their Media Library.
This plugin should allow you to add .exe as a valid mime type.
https://wordpress.org/plugins/enhanced-media-library/
More details from the WordPress forum:
The underlying WordPress function called get_allowed_mime_types is used which is filterable and can be customized based on your needs via the WordPress provided filter named upload_mimes which is documented here: https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes
Thanks, WilltheWebMechanic. Your post helped me fix the issue without reverting to an older version of Woocommerce.
If anyone else is wary of the functions.php file like I am, you can use a plugin for it.
This is the one I used, and it seems nice and stable. Plus, it’s compatible with Woocommerce, which is why I chose it: https://wordpress.org/plugins/enhanced-media-library/
Once it’s installed, you can just add your file type to the ‘Mime’ section of the plugin.
I just added the file types I needed (epub and mobi). I hit save and my products are all working again.

Related

Access Sharepoint files in WordPress media library

Is there a known way of connecting WordPress and Sharepoint in a way, that i can choose files located in Sharepoint inside my WordPress media library?
I searched for hours, but cannot find a solution.
Probably looking the wrong direction.
I read the Sharepoint API -Documentation on files, and learned that I could probably write a Plugin myself, but this will probably get pretty time consuming.
I also found a tutorial on how to automatically create posts in WP from Sharepoint using Powerautomate. I could probably adjust this in order to push files from Sharepoint to WordPress. But I actually don't wont to copy files to WordPress, I want to access them directly.
As a further approach i integrated OneDrive into WordPress using this plugin
But this just creates a new problem because I can't find a way to access the folder, created by the Plugin in OneDrive from Sharepoint.
It boggles my mind, that I can't find a ready made solution.
I can't be the only one with that requirement, or am I?
Help is greatly appreciated

Migrating a SPIP (version 3) website to a Wordpress website: any existing software ?

I have to find a way to import website based upon SPIP 3 to a wordpress site. Both sites do already exist, and the ancient site (SPIP3) contains approximately a thousand articles, in about 10 categories, written by ten authors or so (it's an association site). Is it possible to find a software efficient to do so? Thank you in advance for your answer if you know about that.
I was looking for this kind of software too a few weeks ago.
I found this post https://www.fredericgilles.net/tutorial-migrate-spip-to-wordpress/
It is a WordPress Plugin with two versions:
Free version (it imports only posts, categories and images)
Premium version (it imports in additional authors, it implements SEO
URL editing, ...)
I've tried yet the free version and it's worked for me (my SPIP version was the 3.1 one).
At first, make a backup of your old website using SPIP, SPIP 3 supports at least two formats : sqlite and XML (with compression packaged as a .gz archive or without compression). This is explained here. Personally, I use XML without compression.
Then, access your (s)ftp account, go into /spip/html/tmp/dump to find and download your backup file. You can do that in command line or by using FileZilla.
After that, look at the beginning of your backup file, it tells you where your logos, your documents and your images are stored. Access your (s)ftp account again to find and download them.
Finally, upload your logos, your images and your documents into your Wordpress media library. The trickiest part consists in converting your SPIP backup file into a RSS 2 Wordpress XML file. If you don't want to deal with this conversion, maybe you can try WP All Import (open source Wordpress plugin). Otherwise, when you have a RSS 2 Wordpress XML file, you can use the official Wordpress Importer plugin exactly like you would do to import the content of another Wordpress website.
I have to explain to the motivated developers how to convert SPIP XML into RSS 2.0 XML for Wordpress. Each SPIP version may use a different syntax. I advise you to use XSLT to perform the conversion but it's possible to obtain a similar result by parsing the former, make your own processing and write the latter, this is what I do with Java Stax API. You have to look for spip_articles to get your articles for example. The exact term for the format used by Wordpress is "WordPress eXtended RSS". You'll have to convert the SPIP syntax into a subset of (X)HTML supported by Wordpress too.

How to move site from Adobe Business Catalyst to Wordpress

I have a site that I has been created in Adobe Business Catalyst. I am not a fan of this CMS. I am looking to change it to a WordPress site. Is there any easy way to do this? Is there any kind of conversion software or service? I want to keep all the file names and redirects, etc the same.
One of my clients wanted to leave Business Catalyst and merge it with a Wordpress.com blog. The way I got around Adobe's lack of export was as follows;
I used my Linux Server to pull everything off the Adobe Servers using
wget --mirror -p --convert-links -P ./Local/Dir Website-ULR
Tutorial Here, Number 10
All the HTML files came down without any extensions so;
I copied the directory to my Mac and used Fork Lift to batch rename the files to add .html - though any renaming software will do.
The import tool for Wordpress needs an index file to find all your pages so I needed to make an index.html page with links to every post so;
I copied them back to the Linux machine and used
tree -H baseHREF ./Local/Dir
depending on OS you may need to download the tree package or similar.
This then generated an onscreen HTML file in the Terminal Window so;
I copied the HTML code it created and put it into Dreamweaver with the rest of the site, though any software will do, to run a batch clean up of the links.
As Wordpress.com doesn't allow you to install plugins I needed to put it on a my local installation of Wordpress to do the import.
I then used the Import HTML 2 plugin to get the pages into my local Wordpress installation
As I was moving the files to a Wordpress.com site;
Export from from my Wordpress and import into their blog.
I hope this helps anyone, in total it took me 12 hours to find all the tools I needed and to work out all the steps I needed. If i needed to do it again it would take up to an hour now I know how to do it.
I had more links in the post but as I'm new to the forum I was only allow 2.
Better people than I might be able tell you a quicker way to do this.
The only things that can be "exported" in Business Catalyst are E-commerce products and Web App items - they can be exported as .CSV files. You can then hire a programmer to convert them over to a format that works with Wordpress.
Exporting blogs from the Business Catalyst blog module is tricky - one way to do it is to enable RSS and copy the RSS feed and open it in excel to save it as a .CSV or .TAB file where you may be able to import the blogs or get a programmer to convert it into soomething Wordpress compatible.
Thank you for taking time to better explain your platform to me.
In the way of an answer, I recommend the following:
Export your current web site details into a csv file using Screaming Frog.
Then use the CVS Importer WordPress Plugin
This is working for me. I would still be pleased to hear if others have found a process that they also find suitable.

Exposing wordpress media files to visitors

I need to add a page on my wordpress site showing documents uploaded through the media library (ideally only specific files such as pdf, docx etc not images files). The idea is to have visitors directly download such files without logging in.
Any ideas on how to go about it ?
Thanks,
Mark
This is something that will be best implemented through a Wordpress plugin. Take a look at http://wordpress.org/extend/plugins/media-library-assistant/
At the end of the day, if you can't find a pre-existing plugin, your best option is to make one. Some links for plugin development are:
http://codex.wordpress.org/Writing_a_Plugin
http://codex.wordpress.org/Plugin_API
http://codex.wordpress.org/Plugin_Resources

Wordpress: Editing pages with another editor

Relatively simple question, but I can't find the answer: How can I edit static pages (or posts) with my own editor instead of using WordPress? I'm not asking about the details of how to FTP, but instead where can I actually find the pages I created using WordPress in the WordPress directory?
Thanks.
The content of the pages you create are stored in the mySQL database rather than as static files so you cannot just see them if you look through the directory. The software reads out the data from the db when requested and renders it according to various settings.
As for editing your wordpress pages/entries using an external editor, wordpress supports an XML RPC interface which can be used to communicate with it. For an example of an emacs extension to edit WP articles, check out http://www.tolchz.net/2008/01/06/posting-to-wordpress-with-emacs-webloggerel/. I'm sure many other editors have this facility as well (including, I'm led to believe, Microsoft Word).
Finally, if you want to use the web interface but use your own editor for the textboxes where you edit pages/articles, check out the it's all text plugin for Firefox.
Windows Live Writer is an excellent editor for this purpose. The latest version (2011) surprisingly better than the first, which was already more than I expected for a freebie, and a small project team.
Make sure you avoid all the extra "Live" options and just leave the Writer checked for install. And in WP admin settings, enable XML RPC.
wp generates dynamic pages - that means the pages only exist the moment they are requested. You would first need to "statify" them - simply downlowding would do, but there's also plugins that can do this.. Usually needed for optimizing speed/cache
Looking for "wordpress static pages plugin" might help..
PS: this would do the job of making wp 'static'
http://wordpress.org/extend/plugins/really-static/

Resources