Fixing the “Fonts Folder Does Not Exist” and “CSS Folder Does Not Exist” Errors in OceanWP

Encountering the “Fonts folder does not exist” or “CSS folder does not exist” errors in OceanWP can be frustrating, especially when you’re trying to maintain a seamless WordPress experience. These errors typically occur when the theme cannot find the necessary directories for storing custom fonts and their associated CSS files. Understanding why these folders are required and how to resolve the issue is crucial for site stability and SEO performance.

This article will guide you through the steps to fix these errors, explain why OceanWP uses these folders, and provide actionable SEO tips to ensure your WordPress site remains optimized and user-friendly.

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, impacting 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 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 customizations are preserved and not overwritten during upgrades.

Example Error Source in Code

From the OceanWP theme code:

$upload      = wp_upload_dir();
$uploads_fonts_dir = 'oceanwp-webfonts';
$uploads_css_dir = 'oceanwp-webfonts-css';

if ( ! file_exists( trailingslashit( $upload['basedir'] ) . $uploads_fonts_dir ) ) {
    wp_send_json_error( array( 'message' => esc_html__( 'Fonts folder does not exist', 'oceanwp' ) ) );
}

if ( ! file_exists( trailingslashit( $upload['basedir'] ) . $uploads_css_dir ) ) {
    wp_send_json_error( array( 'message' => esc_html__( 'CSS folder does not exist', 'oceanwp' ) ) );
}

Relevant Links

FAQ

Q1: Why am I seeing the “Fonts folder does not exist” error in OceanWP?
A1: This error appears when the required oceanwp-webfonts folder is missing from your uploads directory.

Q2: Where should I create the missing folders?
A2: Both oceanwp-webfonts and oceanwp-webfonts-css should be created inside wp-content/uploads/.

Q3: What permissions should these folders have?
A3: Set folder permissions to 755 to ensure the web server can write to them.

Q4: Will creating these folders affect my theme updates?
A4: No, since these folders are in the uploads directory, they are not affected by theme updates.

Q5: What if the error persists after creating the folders?
A5: Clear your site and browser cache, check folder permissions, and disable conflicting plugins if needed.


Category: News / Posts, oceanwp

Tags:

Leave the first comment