OJS Website Missing Stylesheet: How to Fix Theme and CSS Loading Issues

Introduction

If your OJS journal website suddenly loads without any CSS styling, showing only raw text, broken layout, and missing design, this usually means the system cannot find or apply the active theme’s stylesheet. This is a common issue after moving OJS to a new server, restoring an old backup, upgrading OJS, or changing the base URL configuration.

The good news is that most OJS missing stylesheet problems can be diagnosed by checking a few key areas: theme compatibility, template cache, base URL settings, and PHP error logs. This article walks through these checks step by step so you can restore your journal’s appearance safely.

Problem Overview

When OJS loads without a stylesheet, the browser renders the page as plain HTML. The journal still functions (submissions, editorial workflow, and database records are usually intact) but the visual layer is broken. This affects how authors, reviewers, and readers see your journal.

In many cases, the browser shows no obvious error. The real cause is recorded on the server, not on the screen. Checking the PHP error log or OJS application log often reveals the specific reason why the stylesheet is missing.

Why This Happens

OJS uses a templating system called Smarty to build its pages. The stylesheet is applied through the active theme, which is a plugin that tells OJS how to render the journal’s appearance. When any link in this chain breaks (the theme is incompatible, the template cache is stale, the base URL is wrong, or a PHP error stops the page from loading fully), the stylesheet does not load.

This issue often appears after:

  • Restoring an old OJS backup to a new server
  • Changing the hosting provider or server environment
  • Upgrading OJS to a newer version
  • Changing the base URL in config.inc.php
  • Installing a theme that is not compatible with your OJS version

Common Causes

  • Incompatible or broken theme: A theme built for an older OJS version may not work with your current version, causing PHP errors that prevent stylesheet loading.
  • Stale template cache: OJS compiles Smarty templates into a cache directory. After server migration or PHP version change, cached templates can reference old paths or functions that no longer work.
  • Incorrect base URL: If the base_url setting in config.inc.php does not match the actual domain, the browser may try to load CSS files from a wrong or unreachable path.
  • Missing or corrupted theme files: If theme files were not fully transferred during migration or if file permissions prevent OJS from reading them, the theme cannot load.
  • .htaccess or web server misconfiguration: Missing rewrite rules or incorrect web server settings can block requests for CSS and other static assets.

Troubleshooting Steps

1. Check the PHP Error Log First

The browser rarely shows the real reason for a missing stylesheet. The PHP error log almost always contains the specific error that is breaking the page.

Look for errors like:

  • Call to a member function getOption() on null: often indicates a stale template cache
  • Class ‘PKP\plugins\ThemePlugin’ not found: usually means an incompatible theme
  • Fatal error in a file path containing cache/t_compile: points to Smarty cache issues

If you see an error mentioning a specific theme plugin file, that theme is likely incompatible with your OJS version. If you see errors in cache/t_compile, clearing the template cache should be your next step.

2. Clear the OJS Template Cache

Stale compiled templates are one of the most common causes of missing stylesheets after migration or server change. The Smarty cache stores compiled versions of OJS templates and may contain references to old file paths, old PHP versions, or old server configurations.

To clear the template cache safely:

  1. Access your OJS server via FTP, cPanel File Manager, or SSH.
  2. Navigate to the cache/ directory inside your OJS installation.
  3. Delete the contents of cache/t_compile, cache/t_cache, and cache/_db.
  4. Do not delete the cache/ directory itself, only the contents inside.

After clearing the cache, reload your journal website. OJS will rebuild the templates fresh.

3. Verify Theme Compatibility

If clearing the cache does not solve the problem, the active theme may be incompatible with your OJS version. This is common when a theme designed for OJS 3.2 is used on OJS 3.3 or 3.4, or when a theme was uploaded manually from an external source.

To check:

  1. Log in to the OJS dashboard with Journal Manager credentials.
  2. Go to Settings, Website, Appearance.
  3. Check which theme is currently active.
  4. Under Theme options, look at the list of installed themes. If the dropdown or theme list does not load properly, the active theme may be causing a PHP error that also breaks the admin interface.

If you cannot access the dashboard because the theme is completely broken, you can temporarily switch to the default theme through the database or by removing the problematic theme folder from plugins/themes/. However, this should only be done if you have a current backup and understand the change.

A safer approach: remove incompatible third-party themes from the plugins/themes/ directory, then reload the dashboard. The default OJS theme should activate automatically.

4. Check the Base URL Configuration

If the stylesheet path is pointing to a wrong domain (for example, the old server’s domain), the browser will fail to load CSS files. This happens when OJS is moved to a new server or domain but the base_url in config.inc.php still points to the old location.

To check:

  1. Open the file config.inc.php in your OJS installation directory.
  2. Find the base_url setting under the [general] section.
  3. Make sure it matches the current domain exactly, including the protocol (https:// or http://).
  4. If you recently changed the domain, also check the restful_urls setting is correct.

After changing the base URL, clear the OJS cache again (Step 2) and reload the site.

5. Check File Permissions and Theme Files

After migration or restoration from backup, some theme files may have incorrect permissions that prevent OJS from reading them. The web server user needs read access to all files in the OJS installation, especially in the plugins/themes/ and public/ directories.

Common permission problems:

  • Theme directories set to 777 or other overly restrictive custom settings
  • Files owned by a different user than the web server process
  • Missing .htaccess files that should handle URL rewriting

If you are unsure about file permissions, ask your hosting provider to verify that the web server user can read all OJS files. This is usually a quick check for any competent hosting support team.

6. Test with the Default Theme

If none of the above steps work, test whether the issue is theme-specific by switching to the default OJS theme:

  1. Temporarily move all third-party theme folders out of plugins/themes/ to a backup location outside the OJS directory.
  2. Clear the template cache again.
  3. Reload the journal website.

If the site loads with the default theme, you have confirmed that one of your installed themes is incompatible or broken. You can then reinstall themes one at a time to identify which one causes the problem.

The most reliable sequence for fixing a missing stylesheet in OJS is:

  1. Backup your OJS files and database before making any changes.
  2. Check the PHP error log to identify the specific error.
  3. Clear the template cache (cache/t_compile, cache/t_cache, cache/_db).
  4. Verify theme compatibility, remove incompatible or untested themes.
  5. Confirm the base URL in config.inc.php matches the current domain.
  6. Test with the default theme to isolate the issue.
  7. Restore themes one by one from the OJS Plugin Gallery once the site is stable.

This approach avoids guesswork and keeps your journal data safe throughout the troubleshooting process.

What to Avoid

  • Avoid editing OJS core files to force a theme to load. This can create deeper compatibility issues that become harder to fix later.
  • Avoid uploading themes from unknown or untrusted sources. Incompatible themes can cause PHP fatal errors that break both the frontend and the admin dashboard.
  • Avoid deleting the entire cache/ directory, only clear the contents inside t_compile, t_cache, and _db.
  • Avoid changing file permissions to 777 as a quick fix. This creates a security risk and rarely solves the actual problem.
  • Avoid assuming the issue is with your hosting provider without checking the PHP error log first.

When to Ask for Technical Help

If you have followed all the troubleshooting steps above and the stylesheet is still missing, or if you see PHP errors you do not understand, it is time to ask for help.

Signs that you need technical support:

  • The PHP error log shows errors related to database tables or missing database columns, which may indicate an incomplete migration.
  • You cannot access the OJS dashboard at all, even after removing all third-party themes.
  • The stylesheet loads on some pages but not others, which may indicate a more complex server or plugin issue.
  • The Plugin Gallery is stuck loading and you cannot install or reinstall themes through the OJS interface.

In these cases, a developer or OJS specialist can review the server environment, PHP configuration, database integrity, and file structure to identify the root cause.

FAQ

Why does my OJS website show no CSS after moving to a new server?

This usually happens because the template cache still contains compiled files from the old server environment, or the base URL in config.inc.php still points to the old domain. Clear the template cache and verify the base URL setting.

Can an incompatible theme break the entire OJS website?

Yes. A theme that is not compatible with your OJS version can trigger PHP fatal errors that prevent both the frontend and the admin dashboard from loading properly. Remove incompatible themes from the plugins/themes/ directory and OJS should fall back to the default theme.

How do I safely clear the OJS template cache?

Delete the contents of cache/t_compile, cache/t_cache, and cache/_db (but not the cache directory itself). You can do this through FTP, cPanel File Manager, or SSH. OJS will regenerate these files automatically.

What does Call to a member function getOption() on null mean in OJS?

This PHP error usually indicates that the Smarty template cache is referencing a function or object that no longer exists. It often appears after server migration or PHP version change. Clearing the template cache typically resolves it.

It is not recommended. Themes installed manually from external sources may not be compatible with your OJS version. The OJS Plugin Gallery checks compatibility automatically and is the safest way to install themes.

Conclusion

An OJS website missing its stylesheet is a frustrating but usually fixable problem. In most cases, the root cause is one of three things: a stale template cache after migration, an incompatible theme, or an incorrect base URL. By checking the PHP error log first, clearing the cache, verifying theme compatibility, and testing with the default theme, most journals can restore their visual appearance within a short troubleshooting session.

The key is to work methodically and avoid skipping straight to advanced server changes without checking the basics first. Start with the error log, it usually tells you exactly where the problem is.

Soft CTA

If your journal runs on OJS and you need help with theme installation, upgrade compatibility, server migration, plugin troubleshooting, or ongoing maintenance, the Open Journal Theme team provides specialized OJS support services. You can reach out for a professional review of your OJS setup and get help resolving complex issues safely.

  • OJS Theme Services: link to Open Journal Theme, OJS Theme installation and compatibility services
  • OJS Upgrade Service: link to Open Journal Theme, OJS version upgrade and migration support
  • OJS Maintenance: link to Open Journal Theme, ongoing OJS maintenance and troubleshooting plans
Tags :
About the Author
user-avatar

Hello! I'm Ghazi, im OJS Technical Support from Openjournaltheme. Have a passion for linux, helping solve publisher problems related to the use of OJS, OMP and Eprints.

Leave a Comment

Your email address will not be published. Required fields are marked *

Open Journal Theme

Need More Services  or Question?

Openjournaltheme.com started in 2016 by a passionate team that focused to provide affordable OJS, OMP,  OPS,  Dspace, Eprints products and services. Our mission to help publishers to be more focus on their content research rather than tackled by many technical OJS issues.

Under the legal company name :
Inovasi Informatik Sinergi Inc.

Secure Payment :

All the client’s financial account data is stored in the respective third-party site (such as Paypal, Wise and Direct Payment).
*Payment on Credit card can be done by request
Your financial account is guaranteed protection. We never keep any of the clients’ financial data.

Index