I am currently building a website for sharing statistical files. I am using wordpress CMS to build it. However, when I try to upload files with extension .dta and do files, it raises this error:
cr-ethdat1997-version3.do: Sorry, this file type is not permitted for security reasons.
How can I resolve it?
If you don't want WordPress to check what file types you are uploading, you can add a constant in the
wp-config.phpfile:Otherwise, if you want file type checking, you could add certain mime types with the following filter:
You would need to find the MIME types for the files you'd want to upload (
.do,.dta)Take a look at the Codex for more details: https://developer.wordpress.org/reference/hooks/upload_mimes/