Home

>

Tools

>

Ghost

>

Releases

>

3.29.0

Ghost Release: 3.29.0

Tag Name: 3.29.0

Release Date: 8/10/2020

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost 3.29.0 introduces significant performance improvements for member management, particularly for sites with large member databases. This release focuses on database optimizations with new foreign key constraints and indexes, improved newsletter email sending, and enhanced server shutdown handling. These changes make member listing, filtering, and bulk operations much faster while ensuring graceful server shutdowns for better stability.

Highlight of the Release

    • Significant performance improvements for member management operations
    • Enhanced database schema with foreign key constraints and cascading deletes
    • Improved newsletter email sending with concurrency support
    • Graceful server shutdown handling with stoppable connections

Migration Guide

Database Schema Changes

If you're developing custom integrations that interact directly with Ghost's database schema, note that this release adds foreign key constraints and indexes to member-related tables:

  • members_labels
  • members_stripe_customers
  • members_stripe_customers_subscriptions

These changes include ON DELETE CASCADE behavior, which means deleting a parent record will automatically delete related child records at the database level.

Server API Changes

The server announcement functions have been refactored for clarity. If you're using these functions in custom code:

  • announceServerStart and announceServerStopped have been consolidated
  • Bootstrap socket logic has been moved to @tryghost/bootstrap-socket

Package Updates

Several dependencies have been updated, including:

  • knex to v0.21.4
  • mocha to v8.1.1
  • Various TryGhost packages

Upgrade Recommendations

Recommended Upgrade Path

This release is recommended for all Ghost users, especially those with large member databases who will benefit from the significant performance improvements.

Standard Upgrade Process:

  1. Back up your database before upgrading
  2. Update Ghost-CLI to the latest version: npm install -g ghost-cli@latest
  3. Run ghost update in your Ghost installation directory

Notes:

  • The database migrations in this release only run on MySQL installations, as SQLite does not support altering tables in the same way
  • If you have a large member database, the migration process might take longer than usual due to the addition of indexes and constraints

Bug Fixes

Database Cleanup

  • Fixed potential issues with duplicate entries in subscription_id or customer_id columns
  • Removed orphaned rows in subscription and customer tables
  • Optimized cleanup migrations to avoid slow JOIN operations

Server Handling

  • Fixed connection handling during server shutdown
  • Corrected default shutdown timeout from 600s to 60s
  • Prevented Grunt from exiting without letting Express stop properly

New Features

Database Optimizations for Member Management

  • Added foreign key constraints with ON DELETE CASCADE to member-related tables for faster operations
  • Added indexes to improve query performance for member filtering and listing
  • Implemented database-level cascading deletes for more efficient bulk member operations

Improved Newsletter Email Sending

  • Switched from membersService.api.members.list to Bookshelf Member.findPage() with filters
  • Added concurrency to Mailgun API requests in the bulk-email service
  • Added debug statements with timing output for performance measurement

Server Enhancements

  • Added server testmode to help test behavior without complex interactions
  • Implemented graceful shutdown handling with the stoppable package
  • Added improved logging for server start/stop events

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Member Management Performance

  • Added foreign key indexes and constraints with cascading deletes to significantly improve member operations
  • Optimized database queries for listing free/paid members
  • Improved bulk deletion performance by moving operations to the database level

Newsletter Sending Performance

  • Reduced N+1 queries when preparing member data for newsletters
  • Added concurrency to Mailgun API requests to reduce overall sending time
  • Optimized member filtering to avoid heavy post-fetch operations

Server Performance

  • Implemented proper connection handling during shutdown
  • Added graceful termination of active connections
  • Improved server startup and shutdown processes

Impact Summary

Ghost 3.29.0 delivers substantial performance improvements for sites with large member databases. The addition of foreign key constraints and indexes to member-related tables significantly speeds up common operations like listing, filtering, and bulk deletion of members. Newsletter publishers will benefit from optimized email sending with new concurrency support for Mailgun API requests.

The server handling has been refactored for better stability, with proper graceful shutdown handling that allows active connections to complete before closing. This prevents abrupt termination of user requests during server restarts or shutdowns.

While these changes are mostly under-the-hood improvements, they represent important infrastructure enhancements that make Ghost more scalable and reliable, particularly for sites with growing member bases. The performance gains will be most noticeable for administrators managing large member databases and sending newsletters to substantial audiences.

Full Release Notes

No user-visible changes in this release.

See the changelogs for Ghost and Ghost-Admin for the details of every change in this release.

Statistics:

File Changed25
Line Additions917
Line Deletions588
Line Changes1,505
Total Commits33

User Affected:

  • Improved performance when managing large member databases
  • Faster listing and filtering of free/paid members
  • More efficient bulk member deletion operations
  • Better newsletter email sending performance

Contributors:

renovate-botallouiskevinansfieldErisDSdaniellockyer