👻 Ghost 4.0.0-rc.0 is a release candidate of our upcoming 4.0 major release - stay tuned!
View the changelogs for full details:
- Ghost - 3.42.0...4.0.0-rc.0
- Ghost-Admin - TryGhost/Admin@3.42.0...4.0.0-rc.0
Pre Release
Tag Name: 4.0.0-rc.0
Release Date: 3/5/2021
GhostOpen-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.
Ghost 4.0.0-rc.0 introduces significant architectural improvements and new features that enhance the publishing experience. This release candidate brings a new accent color system for better theme customization, improved URL handling with the __GHOST_URL__ placeholder, enhanced price formatting with the updated {{price}} helper, and better member management with refined event tracking. The update also includes important security improvements with foreign key constraints in SQLite, performance optimizations for test suites, and API standardization with v4 as the new default API version. This is a major release with some breaking changes, so testing in a non-production environment is recommended before upgrading.
__GHOST_URL__ placeholder for better performance{{price}} helperUpdate Ghost-CLI:
npm install -g ghost-cli@latest
Ghost 4.0 requires Ghost-CLI version 1.16.0 or higher.
Backup Your Site:
ghost backup
Check Theme Compatibility:
Ensure your theme is compatible with Ghost 4.0. Themes using deprecated features like {{@labs.members}} or Ghost API v2 will receive warnings.
If you're developing custom integrations or themes:
{{@site.lang}} with {{@site.locale}} in themesPrice Helper: If using the {{price}} helper, review its implementation as it now has enhanced formatting capabilities.
Date Helper: The default format for the date helper now uses locale-based strings. Test your theme to ensure dates display as expected.
Accent Color: Take advantage of the new --ghost-accent-color CSS variable:
.my-element {
color: var(--ghost-accent-color, #defaultColor);
}
Last4 Helper: The {{last4}} helper now returns **** instead of null when empty.
Ghost 4.0 changes how URLs are stored internally using a __GHOST_URL__ placeholder. This should be transparent to most users, but if you've done any direct database manipulation of URLs, you'll need to update your approach.
Verify Member Data: Check that member data and subscriptions are working correctly.
Test Email Functionality: Send test emails to ensure the updated email templates work as expected.
Review Site Settings: Check your site settings, particularly accent color and locale settings, to ensure they're configured correctly.
Who should upgrade: This release candidate is primarily intended for testing purposes. Production sites should wait for the final 4.0.0 release unless they specifically need features in this version or want to help test.
When to upgrade:
How to upgrade:
npm install -g ghost-cli@latestghost backupghost update v4.0.0-rc.0 --forceImportant: The --force flag is required as this is a major version upgrade.
Rollback plan: If issues are encountered, restore from your backup using ghost restore [backup-file].
Testing recommendation: Test thoroughly in a staging environment before upgrading production sites. Pay special attention to theme compatibility, member features, and any custom integrations.
Fixed an issue where the member portal wasn't appearing on 404 pages, ensuring consistent member access across all site pages.
Fixed a critical bug that was causing Ghost to crash when sending bulk emails due to improper handling of Mailgun API responses.
Fixed theme preview not decoding values properly, which caused nulls to be treated as truthy values, resulting in inconsistent preview behavior compared to live themes.
Fixed email permissions for all roles. The migrations in 3.1.0 which added email permissions did not add those permissions to the correct roles, limiting email functionality to only the Owner role.
Fixed issues with orphaned Stripe data in SQLite databases that could cause problems with member management and subscription tracking.
Fixed migrations to 4.x from 1.x by addressing issues with the Slack settings migration that was causing errors on SQLite.
Updated the last4 helper to return a masked value (****) instead of null when card details are empty, preventing null from being displayed in themes.
Ghost now automatically generates a CSS variable (--ghost-accent-color) based on your site's accent color setting. This variable is injected into {{ghost_head}} and can be used by themes to maintain consistent branding across your site and the member portal.
The {{price}} helper has been completely revamped to provide well-formatted currency values. It now supports:
{{price plan}} → "€5"){{price plan numberFormat="long"}} → "€5.00"){{price currency='EUR'}} → "€")Member analytics have been enhanced with:
Ghost now uses locale instead of lang for site settings, providing better internationalization support:
{{@site.locale}} property (with {{@site.lang}} maintained for backward compatibility)Ghost now stores URLs with a __GHOST_URL__ placeholder, providing:
Added 'on delete cascade' to several foreign keys in SQLite databases, preventing orphaned records and potential security issues related to data integrity.
Fixed status code for unauthenticated requests to return 401 Unauthorized instead of 400 Bad Request, providing more accurate security responses.
Improved error handling in analytics tracking by wrapping the tracking call in try-catch blocks and adding Sentry logging, preventing potential crashes from malformed analytics data.
The test suite has been significantly improved:
The new URL storage format using __GHOST_URL__ placeholders provides substantial performance benefits:
Added ElasticSearch logging support when available, improving logging capabilities and performance for larger installations.
Added foreign key constraints to SQLite databases, which improves data integrity and can lead to better query performance in some cases.
Ghost 4.0.0-rc.0 represents a significant evolution of the platform with architectural improvements that enhance performance, security, and developer experience. The introduction of the accent color system and improved price formatting provides better branding consistency and monetization capabilities. The shift to v4 as the default API version standardizes the platform's interfaces while maintaining backward compatibility.
For theme developers, the new CSS variables and helper improvements offer more powerful customization options. Site owners benefit from enhanced member analytics and more consistent styling across their sites. Developers will appreciate the more efficient URL handling and improved test organization.
This release also introduces a new limit service that allows hosting providers to better manage feature restrictions based on subscription tiers, which is particularly important for Ghost(Pro) and other managed hosting services.
While this is a major version update with breaking changes, the Ghost team has worked to minimize migration pain points. Most changes are architectural improvements that should be transparent to end users but provide a more solid foundation for future development. The migration path has been carefully considered, with backward compatibility maintained where possible and clear upgrade paths provided where not.
👻 Ghost 4.0.0-rc.0 is a release candidate of our upcoming 4.0 major release - stay tuned!
View the changelogs for full details: