Every Las Vegas web designer understands the need for selecting the perfect fonts for your web design. Choosing the right font for your design can make or break your site concept and flow. Fonts are the guide for all the content on your web site, so choosing the right one is critical. Most WordPress themes provide access to many standard Microsoft fonts and an array of Google fonts to make your web site look awesome. Sometimes those fonts are enough, but if you really need a font that matches the look your site is going for, you will need a custom font. Adding custom fonts to a WordPress site can be tricky, but we have the solutions for you.
For our examples in this articles, I am using the WordPress theme Avada, one of the most commonly used themes. I will also be using the GoDaddy Cpanel, but the Mime Types options should be available in all standard Cpanels. It is important that if you are a Las Vegas Web Development company that you understand which theme and Cpanel you are using. If you are not sure, contact your hosting company for assistance.
The biggest hurdle to adding custom fonts to a WordPress web design is the dreaded WordPress Error when uploading a font:
“Sorry, This File Type Is Not Permitted For Security Reasons”
Take a deep breath, we can solve this one. I will show you three ways to solve this issue, starting with the easiest to the hardest. Implement the fixes below in the order I suggest and test your site after trying each fix. If you can’t upload custom fonts and get the error again, try the next fix.
To start, why are you getting this error not allowing the upload of certain file types? By default WordPress is set to recognize several different files types, but to avoid viruses and other random corruption, block others.
Default WordPress and Web Hosting Cpanel (Most) Allowed Files Types. The more common ones.
Image File Type
.jpg, .png , .gif
Document File Type
.pdf (Portable Document Format; Adobe Acrobat)
.csv/.xls/.xlsx (Microsoft Excel Document)
.doc/.docx (Microsoft Word Document)
.ppt/.pptx/.pps/.ppsx (Microsoft PowerPoint Presentation)
.xls/.xlsx (Microsoft Excel Document)
.mp3, .m4a,.mp4, .flv,.wav, .midi..wma
.mov, .mp4, .m4v, webm, .avi, .mpg, wmv, ogv
Of course you will have .zip file archives as well. A few file types you don’t see besides .exe are .ttf, woff, woff2, .svg, and .eot. Those are the fonts files you will need to be able to upload to your web site in order to use them within your design.
Let’s get this figured out and do it with the least possible chance of doing any permanent damage to your site. In fact, none of our fixes we recommend can damage your site or it’s function if properly applied.
FIX 1 – Edit Your wp_config.php file
This is an easy to find WordPress file located in your root WordPress directory.
Edit the file and add the following line of code directly above line/* That’s all, stop editing! Happy blogging. */
Save the file.
If your hosting provider has not setup blocks and the blocks are within your WordPress configuration, this fix should be the fix you need. It will allow WordPress users to upload any file type they choose.
FIX 2 – WordPress Plugins
This choice CAN work and CAN’T work since plugins don’t always work with certain themes. It will highly depend on your theme and which version of WordPress you are using. I recommend always using the most up-to-date version of WordPress. Some plugins work great, while other don’t , especially if they conflict with the theme or other plugins you may have installed. It’s why this is the one FIX I wouldn’t recommend using. As a Las Vegas web design company, we live by the credo, the least amount of plugins the better. The more plugins used during a design, the more conflicts you can create and the more updates you have to stay on top of.
So this route is an easy route at first, but may be painful later. Here are some recommend WordPress Plugins to allow custom fonts Mime Types.
There are a few others, but the two plugins above are the most downloaded and overall best performing plugins.
FIX 3 – Edit Mime File Types In Cpanel (Web Hosting)
If all else fails, lets fix the problem at the source, your web hosting Cpanel. Hosting accounts are very protective of their customers data and will likely not allow certain files to be uploaded, unless the customer needs it. This avoids possible corruption or getting viruses.
Do the following;
- Log into your Web Hosting Cpanel.
- Scroll down the choices until you see the “ADVANCED” options. If your cpanel is different, Mime Types may be underneath a different section title, but look for “MIME Types” as seen below.
- Click on MIME Types.
- Add in a MIME Type. For True Type fonts, use font/ttf.
- Add an extension .ttf for True Type Font.
- Click Add.
After you add the .TTF extension, your Cpanel should look like this:
You can repeat the above process if you wish to use other font extensions. Hopefully by FIX 3 your upload issues have been solved and you can now freely upload custom fonts to your WordPress web site. Over at Send It Rising, we face many challenges in designing the best web sites we can for our customers. We do not let issues like uploading files stop our web design process. If you find yourself dealing with a challenge like this one, please reach out to us at www.senditrising.com/contact and we will be happy to assist you.