By: Ivan Kahl

WordPress, launched in 2003, is an open source, PHP-based CMS that uses a MySQL database to store data. Developers can use it to create blogs, websites, landing pages, and web apps. This versatility has made WordPress overwhelmingly popular, and it currently powers over 43 percent of all websites. It also boasts a significant community of contributors who develop various parts of WordPress.

Ghost, which launched after a successful Kickstarter campaign in 2013, calls itself a platform dedicated to publishing. Ghost’s goal is to make writing blog content enjoyable and straightforward while allowing for some extensibility and customization. Like WordPress, Ghost uses a MySQL database for storing content, but the software is written in JavaScript using Node.js. It’s also free and open source, and is currently used by .1 percent of all websites.

Both platforms are good options for building and hosting websites. This post will compare the two platforms by looking at several factors, including plugins and themes, developer experience (DX), ability to customize, community support, and hosting options.

Plugins and Themes

Each platform lets you change the appearance of your website using themes. The platforms also offer options for you to extend the default functionality.

WordPress

You can extend WordPress’s core functionality using plugins. Plugins are helpful if you need functionality not available in WordPress’s core, such as e-commerce features or community forums. You can also customize the appearance of your website using themes. There is a wide range of themes and plugins are available on the official WordPress repositories for plugins and themes, as well as third-party repositories such as CodeCanyon or Envato Elements.

WordPress makes creating a custom plugin or theme easy if you find that your use case requires something more specific. You can make plugins and themes using a combination of PHP, HTML, CSS, and JavaScript. To extend WordPress in your theme, you can create a functions.php file in your theme’s folder and add the additional logic there. Alternatively, you can develop a standalone plugin for WordPress so that the additional logic is not tied to your theme.

For example, WordPress lets you crop images you upload into predefined sizes. By default, these sizes are Thumbnail, Medium, Large, and Full. To demonstrate how convenient developing WordPress plugins and themes is, let’s look at how you can add another predefined image size. To do this, add the following code to your theme’s functions.php file:

add_theme_support('post-thumbnails');
// The parameters are the predefined size name, the width, height
// and whether the image should be cropped (true) or scaled (false).
// See more here: https://developer.wordpress.org/reference/functions/add_image_size/
add_image_size('profile-avatar', 400, 400, true);

Then, to name the custom image size, you’ll write a function that hooks into the image_size_names_choose function, which loads the different image sizes when managing media in the WordPress dashboard.

add_filter( 'image_size_names_choose', 'profile_avatar_image_size_name' );
function profile_avatar_image_size_name($sizes) {
    return array_merge($sizes, array(
        'profile-avatar' => __('Profile Avatar'),
    ));
}

Finally, you can display images in your theme by adding the following lines of code to one of your theme’s template PHP files:

if (has_post_thumbnail()) {
  the_post_thumbnail('profile-avatar');
}

WordPress makes it remarkably easy to develop custom functionality. In less than twenty lines of code, you can add a custom image size, modify the WordPress dashboard to show the custom size, and then use that custom image size in your theme.

Ghost

Unlike WordPress, Ghost does not support plugins. Instead, Ghost lets you build integrations using Zapier. You can also customize the appearance of your Ghost website using themes. The Ghost installation includes some free themes, and you can also find more themes in the Ghost theme repository.

Ghost also lets you develop custom themes using HTML, CSS, JavaScript, and Handlebars. Any functionality that you want to include in the frontend of your website will be included in the theme. To extend Ghost’s backend, you’ll need to develop a custom integration using Zapier or the Ghost APIs and webhooks.

The Verdict

WordPress and Ghost both work well out the box. However, extensibility is essential to consider if you have a complex site, or if you want the ability to grow and adapt your website in the future. WordPress comes with numerous themes and plugins, and it’s easy to develop your own if necessary. Ghost, on the other hand, is fairly limited, and only lets you add additional functionality through third-party integrations or by manually editing a theme. WordPress is the clear winner here.

Developer Experience

The following are details on the quality of DX that each platform offers.

WordPress

WordPress has comprehensive developer documentation, including instructions for creating plugins, custom blocks, and themes. If you want to help develop WordPress core, there is also contributor documentation explaining how you can do that. The documentation covers everything from the basics to technical implementation and best practices.

You’ll typically use PHP when developing the WordPress core. If you want to develop themes or plugins, you’ll use a combination of PHP, HTML, CSS, and JavaScript. You could also use a CSS preprocessor such as Sass or Less for styling, and then compile those styles into a CSS file for your theme or plugin. Likewise, you can use a JavaScript framework such as React or Vue.js and compile it to a static site for your theme or plugin.

WordPress exposes all its functionality as a REST API, which you can use to integrate WordPress with your other applications or websites. The REST API uses the popular JSON format for data exchange, making the API easy to use in numerous programming languages. For example, you might want to include the latest posts on your WordPress website in your Android mobile app. The Java code snippet below uses OkHttp and Gson to retrieve the latest three posts from the WordPress REST API:

// Create a new instance of the OkHttpClient and Gson to use for the request
// and processing the JSON response.
OkHttpClient client = new OkHttpClient();
Gson gson = new Gson();
Type postsArrayListType = new TypeToken<ArrayList<Post>>() {}.getType();
// Build the request to the WordPress REST API to get a list of posts
Request request = new Request.Builder()
    .url("http://localhost:3000/wp-json/wp/v2/posts")
    .build();
// Make the request and get the JSON response
try (Response response = client.newCall(request).execute()) {
    // Deserialize the JSON response into a list of Post objects
    ArrayList<Post> posts = gson.fromJson(response.body().string(), postsArrayListType);
    // Retrieve the latest (first) three posts
    ArrayList<Post> latestThree = new ArrayList<Post>();
    for (int i = 0; i < 3; i++) {
        latestThree.add(posts.get(i));
    }
}

Ghost

Ghost also has great developer documentation. It guides you through contributing to the platform, as well as developing themes.

You’ll typically use HTML, CSS, JavaScript, and Handlebars when contributing to the Ghost core or developing a theme. Like WordPress, you can use a CSS preprocessor or JavaScript framework. However, you must compile all the code into standard HTML, CSS, and JavaScript files.

At the heart of Ghost are the Admin and Content REST APIs. The Admin API lets you interface with the admin dashboard, while the Content API lets you query posts and pages in your Ghost website. The combination of these two APIs lets you do everything you would be able to do in Ghost’s user interface. You can build powerful integrations in almost any tech stack. However, it does mean that you must host your integration somewhere else and then integrate it with Ghost, which can incur extra costs and effort.

The Verdict

Both platforms offer excellent developer documentation and comprehensive REST APIs that you can use to query data from the content management systems. However, WordPress makes it much easier to extend the platform by letting you write plugins that you can then install on your WordPress website. As a result, WordPress offers the better developer experience of the two platforms.

Ability to Customize

When building your website, you don’t want your creativity limited by the content management system you choose. Both WordPress and Ghost offer customization features that help you create a unique website.

WordPress

WordPress themes are a great way to customize the look and feel of your website. But you don’t need to stop there. From version 5, WordPress has a built-in block editor called the Gutenberg Editor. The Gutenberg Editor makes it simple to drag and drop different blocks to create unique, responsive layouts for your pages while using your website’s theme for styling. You also have the option of using JavaScript and PHP to create or extend Blocks for the Gutenberg Editor.

By default, WordPress supports two different content types: pages and posts. Pages are standalone web pages, while a post is a web page that appears as part of a blog. You aren’t limited to these two content types, though. WordPress lets you create your own custom post types. These are useful when you want to create posts that are different to the primary content of your site. For example, you might want to create a custom post type for client testimonials which you then show on your home page. To do so, you can register a custom post type using the register_post_type method in the functions.php file of your theme or plugin:

function create_testimonial_post_type() {
  $labels = array(
    'name'               => 'Testimonials',
    'singular_name'      => 'Testimonial',
    'menu_name'          => 'Testimonials',
    'name_admin_bar'     => 'Testimonial',
    'add_new'            => 'Add New',
    'add_new_item'       => 'Add New Testimonial',
    'new_item'           => 'New Testimonial',
    'edit_item'          => 'Edit Testimonial',
    'view_item'          => 'View Testimonial',
    'all_items'          => 'All Testimonials',
    'search_items'       => 'Search Testimonials',
    'parent_item_colon'  => 'Parent Testimonials',
    'not_found'          => 'No Testimonials Found',
    'not_found_in_trash' => 'No Testimonials Found in Trash'
  );
  $args = array(
    'labels'              => $labels,
    'public'              => true,
    'exclude_from_search' => true,
    'publicly_queryable'  => true,
    'show_ui'             => true,
    'show_in_nav_menus'   => true,
    'show_in_menu'        => true,
    'show_in_admin_bar'   => true,
    'show_in_rest'        => true,
    'rest_base'           => 'testimonials',
    'menu_position'       => 6,
    'menu_icon'           => 'dashicons-businessperson',
    'capability_type'     => 'post',
    'hierarchical'        => false,
    'supports'            => array('title', 'editor', 'author'),
    'has_archive'         => true,
    'rewrite'             => array('slug' => 'testimonials'),
    'query_var'           => true
  );
  register_post_type('testimonials_post_type', $args);
}
add_action('init', 'create_testimonial_post_type');

You can now create testimonial posts in the Admin Dashboard of your website and update your theme to display them. You can also access testimonials using the WordPress REST API by making a GET request to /wp-json/wp/v2/testimonials. This enables you to use WordPress as a headless CMS or data store for your application or website.

Ghost

Ghost launched with a block-based editor. The editor lets you use different cards to add HTML, Markdown, and dynamic content from various websites. While the interface is very intuitive, it can be restrictive. For example, you can’t create complex layouts using the block editor. Instead, you’ll need to use the HTML card to create a custom card and write your code there. Overall, Ghost’s block-based editor is great for straightforward content, but becomes complicated when creating more complex layouts for your content.

Like WordPress, Ghost also has a concept of posts and pages. Posts are web pages that belong to a blog, while pages are standalone web pages that might appear in menus. Unfortunately, Ghost does not support custom post types or custom fields on posts, and this feature does not seem to be a priority for the Ghost development team. So again, while Ghost makes it easy to work with straightforward content, customization may be more of a struggle.

The Verdict

Ghost’s focus is on making publishing simple, and they’ve achieved that: creating straightforward sites is a breeze in Ghost. However, the focus on simplicity becomes a drawback when creating complex layouts or handling multiple types of content. WordPress comes with sensible default post types, but lets you extend them however you wish. As a result, you can build more complex layouts and support diverse content with minimal development. WordPress takes the win in this category.

Community Support

The following are details on the community size and support available for each platform.

WordPress

WordPress has been around for almost two decades. It’s used that time to create a large and diverse community, including web designers, developers, and content creators from different fields. This means you’re likely to find someone to help you with your WordPress requirements quickly.

If you have a question or issue, the best place to look first would be on the official WordPress forums. You can also check Stack Overflow, which has more than 185,000 questions related to WordPress as of this writing. Many third-party websites offer guides and tutorials for WordPress development.

Ghost

Ghost hasn’t been available for nearly as long as WordPress, but it has gained a strong community of publishers and content creators. You will find much of this community at the Ghost Forum, which has spaces for everything from technical issues to general usage questions. If you don’t have luck at the official forum, check Stack Overflow. It has far fewer posts related to Ghost, though, so you may not find an answer to your question. There are also a few third-party guides and tutorials available.

The Verdict

WordPress is the clear winner when it comes to community support. While both platforms have a significant community, the WordPress community is much larger, which means you’re more likely to find help for your issue or question when using WordPress.

Hosting Options

The platforms offer different hosting options for developers, including managed hosting and self-hosting.

WordPress

Due to its popularity, most web hosting companies support WordPress. Some hosting companies let you self-host WordPress, while others offer managed hosting. Managed hosting makes it simple to get started, as the hosting company takes care of your website’s server. The hosting company keeps the server updated, and often provides SSL certificates, automatic backups, and even content delivery network services for your website.

WordPress.com is Automattic’s official managed hosting solution for WordPress. You can create a website with limited features and a WordPress.com subdomain for free; paid plans, which start from $5 USD per month, offer greater control and more advanced features.

You can also self-host WordPress. Since it uses PHP and MySQL, it can run on the LAMP stack, a popular technology stack for web hosts. Installation is straightforward, and once you’ve installed WordPress on your server, you can follow a simple setup wizard to set up the database and initial website.

If you want to host your website using Docker, the Docker community also provides Docker images, that you can use to deploy WordPress to several cloud providers quickly. You can deploy these container images standalone, or use them within a Kubernetes application.

Ghost

Ghost allows you to self-host or use managed hosting. The benefits of managed hosting are the same as for WordPress. The most popular managed hosting solution is from Ghost. There is no free plan, but they do offer a fourteen-day free trial that you can use to see if Ghost will work for you. After the free trial, paid plans start at $9 USD per month.

When self-hosting Ghost, your options are more limited, as you need a hosting provider that gives you CLI access to the server so you can install Ghost and its dependencies. This can make hosting more expensive, and the most cost-effective option is usually to use a virtual private server (VPS). Some VPS options for self-hosting Ghost are DigitalOcean and Linode, both of which start at $5 USD per month. The setup process for Ghost is more manual than WordPress, and requires that you set up a MySQL database and the Ghost website through the command line.

There are also unofficial Ghost Docker images you can use to deploy Ghost.

The Verdict

WordPress is a clear winner. There are more hosting options, and the price is generally lower than hosting Ghost. In addition, the setup process is much more straightforward when self-hosting WordPress than Ghost.

Conclusion

While Ghost may be your answer if you’re planning a basic, text-only blog and don’t require any extensibility or customization, WordPress is better equipped to support most use cases. As you’ve seen throughout this article, WordPress provides a better developer experience overall, and offers more control over your website’s design, functionality, and content than Ghost does. By providing broadly applicable defaults and allowing extensive customization, WordPress comfortably supports websites of all sizes, at all levels of complexity.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s