Yesterday I tried to upload a Java JAR file in my WordPress-based website, and I was this given this funny error message: "File type does not meet security guidelines. Try another."
The reason for that is that WordPress does not recognize the .jar extension as a known file type. And here is what you have to do to fix this (you are possibly going to need administrator's rights to follow the instructions):
Go into your WordPress installation directory and then go down to the wp-includes directory. In there you should be able to see a file by the name functions.php. Open this file in a text editor.
Use your editor's searching facility to find the text "function wp_check_filetype" (yes, *without* the double quotes, and, yes, *including* the space character between "function" and "wp_check_filetype"). You should be able to see a portion of the file that looks like this:

Add the following line of code as seen in the screenshot below:

The save the file and you are done! You will be now able to upload as many JAR files as you wish without annoying error messages!
The reason for that is that WordPress does not recognize the .jar extension as a known file type. And here is what you have to do to fix this (you are possibly going to need administrator's rights to follow the instructions):
Go into your WordPress installation directory and then go down to the wp-includes directory. In there you should be able to see a file by the name functions.php. Open this file in a text editor.
Use your editor's searching facility to find the text "function wp_check_filetype" (yes, *without* the double quotes, and, yes, *including* the space character between "function" and "wp_check_filetype"). You should be able to see a portion of the file that looks like this:

Add the following line of code as seen in the screenshot below:

The save the file and you are done! You will be now able to upload as many JAR files as you wish without annoying error messages!
Leave a Reply