-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Suggestion for OceanWP Developers
An update should be made to OceanWP that automatically checks for the existence of the required oceanwp-webfonts and oceanwp-webfonts-css folders in the uploads directory. If either folder is missing, the theme or plugin should display a clear message and provide a button to create the required folders with the correct permissions. This would make the process much easier for users and prevent confusion.
Fixing “Fonts folder does not exist” or “CSS folder does not exist” Errors in OceanWP
If you’re seeing errors like:
- “Fonts folder does not exist”
- “CSS folder does not exist”
in your WordPress site using the OceanWP theme, here’s what’s happening and how to fix it.
Why Do These Errors Occur?
OceanWP expects two specific folders to exist in your WordPress uploads directory:
oceanwp-webfontsoceanwp-webfonts-css
These folders are used to store custom fonts and their generated CSS files. If either folder is missing, OceanWP will display an error and may not load custom fonts correctly, which can impact your site’s appearance and user experience.
Where Should These Folders Be?
Both folders should be located in:
wp-content/uploads/
So the full paths will be:
wp-content/uploads/oceanwp-webfontswp-content/uploads/oceanwp-webfonts-css
How to Fix the Errors
- Connect to your site via FTP or your hosting File Manager.
- Navigate to
wp-content/uploads/. - Check if the folders
oceanwp-webfontsandoceanwp-webfonts-cssexist. - If either folder is missing, create it manually.
- Ensure both folders are writable by the web server.
- On most hosts, permissions
755for folders are sufficient.
- On most hosts, permissions
Why Isn’t the Fonts Folder in the Theme Directory Used?
OceanWP stores custom fonts and CSS in the uploads directory, not in the theme or child theme folders. This allows the theme to manage these files independently of theme updates, ensuring your customizations are preserved and not overwritten during upgrades.
Source in Code
You can see references to these folders in the OceanWP theme and plugin code:
# Searching for the error message:
grep -ir "Fonts folder does not exist" *
wp-content/themes/oceanwp/inc/themepanel/theme-panel.php: wp_send_json_error( array( 'message' => esc_html__( 'Fonts folder does not exist', 'oceanwp' ) ) );
# ...and in various language files
# Searching for the folder names:
grep -ir "oceanwp-webfonts" *
wp-content/plugins/ocean-extra/includes/compatibility/ocean.php: $uploads_dir = 'oceanwp-webfonts';
wp-content/plugins/ocean-extra/includes/compatibility/ocean.php: $uploads_dir = 'oceanwp-webfonts-css';
wp-content/themes/oceanwp/inc/themepanel/theme-panel.php: $uploads_fonts_dir = 'oceanwp-webfonts';
wp-content/themes/oceanwp/inc/themepanel/theme-panel.php: $uploads_css_dir = 'oceanwp-webfonts-css';Summary:
If you see these errors, just create the missing folders in wp-content/uploads/ and make sure they’re writable. This will resolve the issue and allow OceanWP to manage your custom fonts and CSS as intended.