Skip to content

ocean-extra is not creating the required folders, this has caused an unexpected not needed error on all of my wordpress sites #127

@rcg4u

Description

@rcg4u

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-webfonts
  • oceanwp-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-webfonts
  • wp-content/uploads/oceanwp-webfonts-css

How to Fix the Errors

  1. Connect to your site via FTP or your hosting File Manager.
  2. Navigate to wp-content/uploads/.
  3. Check if the folders oceanwp-webfonts and oceanwp-webfonts-css exist.
  4. If either folder is missing, create it manually.
  5. Ensure both folders are writable by the web server.
    • On most hosts, permissions 755 for folders are sufficient.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions