The Stoic Scrum Master

TL; DR: The Stoic Scrum Master – Making Your Scrum Work #30

Can wisdom from the past still be relevant to today’s VUCA-determined world? I started reading Marcus Aurelius’ Meditations some time ago and found it intriguing; maybe it applies to “Agile?” In other words: is there something like a Stoic Scrum Master?

If I understand Stoicism correctly, it is about living a life of virtue, which comprises wisdom, justice, courage, and moderation. (All of those can be further subdivided, see Stoic Ethics.) For whatever reason, I felt reminded of Scrum Values and thought: could it be that the first principles of “agile” haven’t been defined by the Agile Manifesto but by “Zeno of Citium in Athens in the early 3rd century BCE?” 

How to Add Magnifying Zoom for Images in WordPress

Do you want to add an Amazon-like magnifying zoom for images in WordPress?

Adding a zoom feature will allow users to see details that they would not see in a normal-sized image.

In this article, we’ll show you how to easily add magnifying zoom for images in WordPress.

How to add magnifying zoom for images in WordPress

Why Add a Magnifying Zoom for Images?

Adding a magnifying zoom feature on your WordPress website will allow visitors to view the intricate details of the images clearly.

If you have a photography website, then adding a magnifying feature will allow users to zoom in on your photographs to view the finer details.

Similarly, if you run an online store, then your customers will be able to zoom in on product images.

Many big eCommerce websites already use magnifying zoom for product images. It allows customers to examine the product and creates a better shopping experience in your store.

That being said, let’s see how you can easily add a magnifying zoom for images in WordPress.

How to Add a Magnifying Zoom For Images in WordPress

First, you need to install and activate the WP Image Zoom plugin. For more details, please see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to head over to the WP Image Zoom » Zoom Settings page from the WordPress admin sidebar.

Next, you need to configure the zoom effect settings by switching to the ‘Zoom Settings’ tab and choose a lens shape that you want to use.

Choose a lens shape

You can choose from circle, square, and zoom window lens shapes. You can even choose a ‘No Lens’ (⨯) option if you don’t want to use a shape for magnifying effect.

After choosing your preferred lens, you need to scroll down to the next step where you can preview an image with the selected lens to see how it works. The plugin has a preview image that you can use to test your changes.

Check the preview of the lens in step two

Next, you need to switch to the ‘General’ tab.

From here, you can select a cursor type, set an animation effect, enable the zoom on mouse hover or mouse click, and define a zoom level.

If you want even more options, some of the features are only available for the pro version of the WP Image Zoom plugin.

Configure General tab settings in step 3

After making your choices accordingly, simply go to the ‘Lens’ tab from the top.

You can now configure settings like lens size, lens color, lens border options, and more if you selected the ‘circle’ or ‘square’ lens in Step 1.

Lens Settings

If you selected the Zoom Window Lens, then you need to switch to the ‘Zoom Window’ configuration tab.

From here, you can change the width and height of the zoom window, positioning, distance from the main image, border colors, and more.

Zoom window settings

Next, you need to simply click the ‘Save Changes’ to store your settings.

After that, all you have to do is configure a few general settings.

Clcik the Save Changes for the last step

Configure General Plugin Settings

Next, you need to switch to the General Settings tab under the plugin settings.

From here, you can now enable features like zoom on WooCommerce product images, thumbnails, mobile devices, attachment pages, product category pages, and more.

All you need to do is simply check the boxes next to these options.

Go to the General Settings tab and check the boxes beside the options you want to activate

You can also remove the lightbox effect, so users can smoothly zoom images.

However, you would need the Pro version of the plugin for this feature.

Remove the lightbox option by checking the box

If you are not going to remove the lightbox for images, then you need to scroll down to the ‘Enable inside a Lightbox’ option and check the box next to it.

Note: You can see supported lightboxes to make sure that the zoom works fine inside a lightbox on your site.

Check enable inside lightbox option

Once you are done adjusting the settings, don’t forget to click on the ‘Save Changes’ button to store your settings.

Magnifying zoom will now be enabled for WooCommerce products.

You can go visit your online store to check our zoom feature.

Zoom feature enabled on the WooCommerce store

However, if you want to enable zoom for images on WordPress posts and pages, you need to follow the step below.

Step 3. Enable Magnifying Zoom for Images in Block Editor

By default, the magnifying zoom is not enabled for images on your posts and pages. You need to do it manually after adding an image to your content.

First, you need to open a post you want to edit in the block editor.

Next, you need to upload an image to that post from the media library or your computer.

Once you do that, simply click on the image to open up its’ Block Settings panel on the right corner of the screen.

From here, simply go to the ‘Styles’ tab and click on the ‘With Zoom’ button to apply magnifying zoom to your image.

Click on the Zoom button

After that, simply click the ‘Update’ or ‘Publish’ button at the top to store your settings.

The zoom feature will look like this on your site:

Zoom feature preview

Note: You will need to repeat this step each time you want to add the zoom effect to an individual image.

We recommend using high-quality images for the zoom feature to look great. High-quality images are normally larger in file size and take longer to load which will affect your website speed and performance.

To solve this issue, you need to optimize your images for the web before uploading them to WordPress.

We hope this article helped you learn how to add magnifying zoom for images in WordPress. You may also want to see our guide on how to optimize images for search engines and our top picks for the best image compression plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Add Magnifying Zoom for Images in WordPress first appeared on WPBeginner.

Developing a Barcode Reader To Make Life Easier

I recently came across an article saying that barcodes and barcode readers have become a mainstay of today's economies and our lives in general since they were introduced in the 1970s.

So, I decided to test how true this is by seeing how often I come across barcode readers on a typical day of mine. And — surprise surprise — they turned out to be more important than I thought.

Rust vs Go: Which Is Better?

It is a question every programmer and developer has asked, and many others still ask, even when they have made their own decision. Rust vs. Go: Which one should I choose in 2023? Or which language to choose: Golang or Rust?

Golang and Rust are the youngest programming languages in use today. Go was launched at Google in 2009, and followed by Go, Rust was launched at Mozilla in 2010. Selecting the ideal programming language is seen as an important preference to prosper in this dynamic environment. The situation is very complex for programmers to select any one language over the other and develop reliable and systematic applications. Developers are always updated with emerging technology, and they can easily deal with the regularly changing mechanisms.

Intrusion Detection Through Cyber Deception: Disrupting Attacks With an Active Defense

We should do our best to ensure our network and pipeline perimeters are secure and make it hard for attackers to gain access. However, the reality is that intruders will stop at nothing to gain access, as evidenced by the Uber, CircleCI, and Dropbox breaches, just to name a few.

Common to all of those incidents was the attacker's behavior once they were inside. Each time they quickly found and exploited hardcoded credentials, giving them further access. Since we know this is something attackers do time after time, it is time to turn this behavior against them by engaging in some blue team cyber deception and start planting honeytokens in our environments.

5 Common Firewall Misconfigurations and How to Address Them

Cybersecurity experts are always learning the latest methods criminals are using to break into networks and steal data — but sometimes the criminals don’t need nefarious solutions. Especially not when people take an average of 277 days to recognize a breach through things like common firewall misconfigurations.

Protect yourself or your clients by addressing these concerns with common firewall issues. When criminals run into optimized firewalls, they’re more likely to look for potential victims elsewhere.

Graph Augmented Intelligence and XAI

There are broad-spectrum real-world applications that can be powered by graph technologies. Social networks dwell on graphs that best model how people follow and befriend each other; Biotech and pharmaceutical companies leverage graphs to understand protein interactions and chemical compounds efficacies; Supply chains, telco networks, and power grids are naturally presented as graphs for root-cause analysis; Financial transactions naturally form networks and fraud detections, smart recommendations or asset-liability management are possible to run across these networked data for improved productivity, prediction accuracy or business intelligence. Many industries are looking to graph’s smart (and deep) data processing capabilities to help with their businesses. 

The big-data era started around 2010, as more and more industries are interested in machine learning (and deep learning and AI) to boost their business predictability; some have been using deep learning and specifically varied neural networks to extract more predictive powers. There are three major problems lingering around, though:

How to Make Testing Progress Visible

Testing efforts can easily go under the radar or be hard to grasp. It’s important to remember that software testing is not only about running tests: it involves multiple crucial facets that contribute to creating better and better software. In this article, we share with you all what we do in order to help the team and the different stakeholders to be informed of the testing progress. 

Testing is aimed to provide information about the quality of our system and the risks that might affect the user experience and our business so that better decisions can be taken. All this in order to mitigate those risks and improve the quality and the experience of our users.

Looking for a Google Optimize Alternative? Your 10 Best Options

google optimize alternativeIf you're a digital marketer or a webmaster, you might be familiar with Google Optimize. It's a highly useful testing and analytics tool for website improvement. However, this popular software is being phased out, so you may be looking for a Google Optimize alternative. In this post, we'll discuss what to look for in a Google Optimize alternative. Then, we'll share some of the best options on the market.

Full Stack GraphQL With Next.js, Neo4j AuraDB And Vercel

This article is a sponsored by Neo4j

Recently I was chatting with some folks about a book I wrote last year titled Full Stack GraphQL Applications. In the book, we demonstrate how to use GraphQL, React.js, and Neo4j to build and deploy full stack applications. One of the most common questions I get from readers is, “Can we use Next.js with this stack?” Next.js is a powerful React framework that adds many additional features and conventions on top of React, so the answer is “Of course!”

In this article, we will explore how to build a full stack GraphQL application that takes advantage of the API Routes feature of Next.js API to combine our GraphQL server and front-end React applications into a single framework.

We’ll use the Neo4j graph database as our data source. Graph databases like Neo4j use the property graph model to enable developers to model, store, and query data as a graph. Both graph databases and GraphQL use the concept of a ‘graph’ to work with application data, making them perfect to use together. The open source Neo4j GraphQL Library makes it even easier to build GraphQL APIs backed by Neo4j, as I’ll illustrate in this article.

Let’s see how to leverage the power of graph data by working with graphs in a full stack GraphQL application with Next.js, Neo4j, and Vercel!

Neo4j AuraDB Overview: Graph Data In The Cloud

First, we’ll set up our database. The easiest way to get started with Neo4j is by using the free tier of Neo4j AuraDB, Neo4j’s cloud database service. The free tier allows us to spin up a Neo4j cluster for building applications without a credit card. We can also choose from several sample datasets to get started. We’ll choose to load the “Graph-based Recommendations” dataset. This dataset contains information about movies and user ratings to demonstrate approaches for personalized recommendations, a common use case for graph databases.

While our database is being provisioned, we’ll be presented with a randomly generated password and the option to download a .env file that contains the connection credentials for our newly created database. Be sure to download this file, as we’ll use it to set environment variables in our Next.js application.

# Wait 60 seconds before connecting using these details, or login to https://console.neo4j.io to validate the Aura Instance is available
NEO4J_URI=neo4j+s://2826d3f8.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=vePwrRzzD23JjCug5tLSPF-pBNsmocHQ45hOc11d6ZY
AURA_INSTANCENAME=Instance01

Once our database is ready, click the Open button to start exploring the data in Neo4j Workspace. Neo4j uses the Cypher query language to interact with the database. The ‘Query’ tab allows us to execute Cypher statements and visualize the results as a graph. Cypher allows us to declaratively define graph patterns using ASCII-art notation. Later, we’ll see how we can use Cypher to find movie recommendations, but for now, this example demonstrates how to filter for a movie by title and traverse the graph to find the actors and genres of the movie as well.

Now that we have our database up and running, we can start to think about the API layer. To build our movies search application, we don’t want just to expose our database to the world — we want an API application to act as a type of gatekeeper, handling things like authorization and business logic. Thanks to a feature of Next.js called API routes, we can combine our GraphQL API application and our React front-end application in a single Next.js project.

Getting Started With Next.js

One of the easiest ways to get started with Next.js is with the create-next-app command line tool. This tool will ask us a few questions to help us create a skeleton Next.js project.

npx create-next-app fullstack-graphql-movies

This will generate a Next.js project with the following structure:

├── README.md
├── jsconfig.json
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│   ├── _app.js
│   ├── _document.js
│   ├── api
│   │   └── hello.js
│   └── index.js
├── public
│   ├── favicon.ico
│   ├── next.svg
│   ├── thirteen.svg
│   └── vercel.svg
└── styles
    ├── Home.module.css
    └── globals.css

We will concern ourselves mostly with the files in the pages directory. With the Next.js file-based routing feature, any files we add to the pages directory will be given their own route using the filename. Let’s start our Next.js application by running the following command:

npm run dev

This will launch a local web server and serve our Next.js application at http://localhost:3000 by default. If we go to this address, we’ll see the default Next.js splash screen. The code for this page can be found in pages/index.js.

If we navigate in our web browser to http://localhost:3000/api/hello, we’ll see an example of a Next.js API route.

{
  name: "John Doe"
}

If we examine the code at pages/api/hello.js, we can see the logic powering this API endpoint, defined as a single function:

// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

export default function handler(req, res) {
  res.status(200).json({ name: 'John Doe' })
}

Similar to its parent pages directory, any file created in the API directory results in a new endpoint matching the name of the file. Unlike pages that define React components, the API directory defines new API routes which can be deployed as serverless functions.

In the next section, we’ll learn how to create a GraphQL server using a Next.js API route and the Neo4j GraphQL Library.

First, let’s bring over the .env file we downloaded from Aura and rename it .env.local in the root directory of our project. Next.js supports setting environment variables using .env files by default, so we’ll be able to use our Neo4j AuraDB credentials in our API route to connect to the database.

Building A Serverless GraphQL Server With Next.js API Routes

Now we’re ready to build our GraphQL API application as a Next.js API route. First, let’s install some dependencies, including the Neo4j GraphQL Library and GraphQL Yoga.

npm install graphql-yoga @neo4j/graphql graphql neo4j-driver

Since GraphQL Yoga supports Next.js API Routes, we’ll use it as our GraphQL ‘server’ framework. We’re going to use the Neo4j GraphQL Library to generate a full GraphQL API, including database queries, using just GraphQL type definitions. Let’s create a new file, graphql.js, in the API directory.

We saw the graph data model containing movies, actors, and genres for our movie’s dataset above, so we’ll write GraphQL-type definitions to match.

 type Movie {
    title: String!
    plot: String
    poster: String
    imdbRating: Float
    actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN)
    genres: [Genre!]! @relationship(type: "IN_GENRE", direction: OUT)
  }

  type Genre {
    name: String!
    movies: [Movie!]! @relationship(type: "IN_GENRE", direction: IN)
  }

  type Actor {
    name: String
  }

Note the use of the @relationship directive. GraphQL schema directives are GraphQL’s built-in extension mechanism and allow us to add additional information used in the Neo4j GraphQL Library’s schema generation process to configure the API. You can see more examples of directives in the documentation.

Next, we’ll read our Neo4j connection credentials from environment variables defined in the .env.local file and create a Neo4j driver instance to connect to the database.

// Read our Neo4j connection credentials from environment variables (see .env.local)
const { NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD } = process.env;

// Create a Neo4j driver instance to connect to Neo4j AuraDB
const driver = neo4j.driver(
  NEO4J_URI,
  neo4j.auth.basic(NEO4J_USERNAME, NEO4J_PASSWORD)
);

Next, we’re ready to pass our GraphQL type definitions and Neo4j driver instance as we create a new Neo4j GraphQL instance:

// Type definitions and a Neo4j driver instance are all that's required for
// building a GraphQL API with the Neo4j GraphQL Library - no resolvers!
const neoSchema = new Neo4jGraphQL({
  typeDefs,
  driver,
});

Because it involves verifying the schema and some database state, building the Neo4j GraphQL schema is an asynchronous process. I’ve moved the asynchronous bit to a function called initServer, which logs when it’s called. I did this so we can see in the application logs each time our GraphQL server is rebuilt. We’ll want to monitor this and make sure we aren’t rebuilding the GraphQL schema at each request, and this will help us do that.

// Building the Neo4j GraphQL schema is an async process
const initServer = async () => {
  console.log("Building GraphQL server");
  return await neoSchema.getSchema();
};

// Note the use of the top-level await here in the call to initServer()
export default createYoga({
  schema: await initServer(),
  graphqlEndpoint: "/api/graphql",
});

You’ll see that we used awaitwith our top-level module export. This is currently an experimental feature that we’ll need to explicitly enable in next.config.js.

const nextConfig = {
  reactStrictMode: true,
  webpack: (config, options) => {
    config.experiments = {
      topLevelAwait: true,
      layers: true,
    };
    return config;
  },
};

Enabling usage of top-level await will allow us to gracefully handle the asynchronous server setup in our API Route.

Now, if we run npm run dev, open our web browser, and navigate to http://localhost:3000/api/graphql, we’ll see the GraphQL Yoga GraphiQL in-browser IDE and be able to start querying our GraphQL API to fetch movie data from Neo4j. Note that we didn’t need to write any resolver functions or database querying logic to implement our GraphQL API. The Neo4j GraphQL Library generated operations for each type defined in our type definitions, including arguments for filtering and pagination.

Now that we’ve created a Next.js API route for our GraphQL endpoint, let’s see how we can use our GraphQL endpoint in our React application.

Client Side Data Fetching With Apollo Client In Next.js

There are several ways to approach data fetching with Next.js, such as static site generation, server-side rendering, and client-side rendering. We’re going to focus on client-side rendering with GraphQL — executing GraphQL requests from the client web browser to fetch data and update the DOM in our application. For an overview of other approaches to data fetching with Next.js, see this blog post that also shows other ways of using Neo4j with Next.js.

We’ll be using Apollo Client in our React application to execute GraphQL data fetching queries. Apollo Client has a React integration that uses hooks as the primary interface. Hooks are functions that allow us to ‘hook’ into React state and other lifecycle methods and are commonly used with data fetching in React applications. Let’s install Apollo Client and start using it in our React application.

npm install @apollo/client

We’ll need to update pages/_app.js to create our Apollo Client instance and inject it into the React component hierarchy so that we can make use of the useQuery and useMutation hooks that Apollo Client provides for interacting with a GraphQL API from our React application.

In pages/_app.js, we first import the modules we’ll need from Apollo Client.

import {
  ApolloProvider,
  ApolloClient,
  InMemoryCache,
  HttpLink,
} from "@apollo/client";

The ApolloProvider component uses the React Context API to make our Apollo Client instance available throughout our React application. The InMemoryCache and HttpLinkmodules are used to configure the cache and networking layer for connections to our GraphQL API.

Next, we’ll define a function to create a new ApolloClient instance, specifying the endpoint for our GraphQL API served as an API route.

const createApolloClient = () => {
  const link = new HttpLink({
    uri: "/api/graphql",
  });

  return new ApolloClient({
    link,
    cache: new InMemoryCache(),
  });
};

Then we can inject the ApolloProvider component into our React component hierarchy.

export default function App({ Component, pageProps }) {
  return (
    <ApolloProvider client={createApolloClient()}>
      <Component {...pageProps} />
    </ApolloProvider>
  );

Now we’re ready to start fetching data in our application. Let’s replace the Next.js default landing page with a movies search page that will allow us to search for movies by genre and see details about the top-rated movies. Later, we’ll add a movie recommendation feature to show recommended movies based on the top results.

We’ll replace the existing index.js, starting with some imports.

import React, { useState } from "react";
import { gql, useQuery } from "@apollo/client";

useState is a hook function that allows us to work with React state variables. useQuery is a hook function provided by Apollo Client that we’ll use to query data from our GraphQL API. The gql template tag helps with parsing GraphQL operations.

As you can see, hooks are such a fundamental part of React that we use a hook to manage state variables as well. To enable the user to search for movies by genre, we’ll declare a state variable to keep track of the user’s selected genre.

 const [selectedGenre, setSelectedGenre] = useState("Action");

Next, we need to define the GraphQL query used to search for movies by genre. We’ll also return information about the movie, like the poster URL and who acted in it. We’ll use a GraphQL variable in the query to filter for movies matching the selected genre.

const MOVIE_SEARCH_QUERY = gql`
    query MovieSearch($selectedGenre: String!) {
      movies(
        where: {
          genres: { name: $selectedGenre }
          imdbRating_GTE: 0.0
          poster_NOT:""
        }
        options: { limit: 100, sort: { imdbRating: DESC } }
      ) {
        title
        plot
        poster
        imdbRating
        actors {
          name
        }
        genres {
          name
        }
      }
    }
  `;

We’ll use this query with the useQuery hook to fetch data, passing in the value of our selectedGenre state variable. If we have an error or loading state from our GraphQL operation, then we render a placeholder.

 const { loading, error, data } = useQuery(MOVIE_SEARCH_QUERY, {
    variables: { selectedGenre },
  });

  if (error) return <p>Error</p>;
  if (loading) return <p>Loading...</p>;

We’ll use a simple select form input to let the user choose the movie genre. By binding the value of the form to our selectedGenre state variable, we have created what’s called a controlled component — a form that is controlled by React state.

To render the results of the movie search GraphQL query, we’ll map over the movie results and add a row to a table with the details for each movie. We can find the results of our GraphQL operation in the data variable, the shape of which matches the selection set of our GraphQL query.

<h2>Results</h2>
      <table>
        <thead>
          <tr>
            <th>Poster</th>
            <th>Title</th>
            <th>Genre</th>
            <th>Rating</th>
          </tr>
        </thead>
        <tbody>
          {data &&
            data.movies &&
            data.movies.map((m, i) => (
              <tr key={i}>
                <td>
                  <img src={m.poster} style={{ height: "50px" }}></img>
                </td>
                <td>{m.title}</td>
                <td>
                  {m.genres.reduce(
                    (acc, c, i) =>
                      acc + (i === 0 ? " " : ", ") + c.name,
                    ""
                  )}
                </td>
                <td>{m.imdbRating}</td>
              </tr>
            ))}
        </tbody>
      </table>

If we return to our web browser, we can see our application up and running. Try choosing a different genre in the form to see the results of our GraphQL search.

Now that we have our application running locally, let’s see how we can deploy this simple movie search application to the web using Vercel and Neo4j AuraDB.

Deploying to Vercel And Neo4j AuraDB

Next.js is a powerful React framework when used on its own, but when we pair Next.js with Vercel, a platform for deploying web applications, we can leverage some huge developer experience benefits. To deploy our application on Vercel, we’ll first push it to GitHub and connect the GitHub repository to a new project in Vercel. Later, we’ll show an advantage of using this approach when adding new features to our app: ‘preview’ deployments that allow us to test and share our updated application to gather feedback before updating the production deployment.

First, we’ll create a new GitHub repository and push our Next.js application to it. By default, create-next-app generated a git repository for us when we started the project. Let’s commit our changes and push them to our new GitHub repository.

git add -A
git commit -m "add fullstack graphql app"
git remote add origin git@github.com:johnymontana/fullstack-graphql-movies.git
git push -u origin main

Next, we’ll sign in to Vercel and create a new project. If you don’t have a Vercel account, you can create one for free. The free tier of Vercel includes all the features we need to deploy our Next.js application.

Since our .env.local file with our database credentials wasn’t checked for version control to keep our secrets safe, we’ll need to specify our Neo4j AuraDB credentials as environment variables when configuring the project in Vercel. We can use a different database here to have multiple development, staging, and production environments.

Hit the Deploy button, and after a few seconds (and some confetti), our application will be deployed to the web. Vercel will even assign our app a new domain name and SSL certificate. Our React application is deployed to Vercel’s CDN, while our API Routes are deployed as serverless functions.

This is great, but let’s see how we can take advantage of Vercel’s preview deployment feature. We’ll add a new feature to our app and push it to a new branch of our GitHub repository, which will trigger a new preview deployment on Vercel.

Adding A New Feature And Vercel Preview Deployments

Preview deployments allow us to test and share new features to our application without updating our production deployment. To see how this works, let’s add a recommended movie feature to our application. To do this, we’ll add a new field to the Movie type in our GraphQL API called similar that will return a list of similar movies a user might be interested in watching if they liked the original movie. We’ll use the @cypher schema directive to attach custom logic to our GraphQL API using a Cypher statement.

First, we’ll write a Cypher query to find similar movies. We saw earlier that Cypher allows us to declare graph patterns using ASCII-art syntax, so our Cypher query will define a graph pattern to find similar movies by traversing through the actors and genres of the movie.

MATCH (m:Movie {title: "Matrix, The"})
MATCH (m)-[:ACTED_IN|:IN_GENRE]-()-[:ACTED_IN|:IN_GENRE]-(rec:Movie)
WITH rec, COUNT(*) AS score ORDER BY score DESC
RETURN rec LIMIT 3

We could also use things like user ratings to improve our movie recommendations, but this is a good start. In our GraphQL type definitions in api/graphql.js, we’ll add our new similar field and annotate it with our movie recommendation Cypher statement.

 extend type Movie {
    similar(first: Int = 4): [Movie!]! @cypher(statement: """
    MATCH (this)-[:ACTED_IN|:IN_GENRE]-()-[:ACTED_IN|:IN_GENRE]-(rec:Movie)
    WITH rec, COUNT(*) AS score ORDER BY score DESC
    RETURN rec LIMIT $first
    """)
 }
 

We use the this variable in the Cypher statement to refer to the currently resolved movie. Similarly, any GraphQL field arguments we define will be passed to the Cypher statement as Cypher parameters, like the $first parameter that will allow for specifying the maximum number of similar movies to return.

If we include this new similar field in our GraphQL movies search query and in the result table, we’ll see a recommended movie for each movie in our search results.

Let’s create a new git branch and commit our changes to this new branch. This will trigger a preview deployment on Vercel. Our updates will be deployed to a new domain, which we’ll be able to share and test before merging the changes to the main branch and moving the deployment to our main domain.

git checkout -b recommendations
git add -A
git commit -m "add recommendations feature"
git push origin recommendations

One neat feature included in each preview deployment is the ability for our users to add annotations and feedback to our app just by clicking on the screen. This is a great way to gather feedback on a new feature just by sharing the URL to your preview deployment!

In this blog post, we saw how to use Next.js and Neo4j AuraDB to build and deploy a full stack GraphQL web application. We used the Neo4j GraphQL Library in a Next.js API route to quickly create a fully featured GraphQL API backed by a native graph database as a serverless function. We also saw some of the advantages of using Vercel to deploy our full stack application, like the preview deployment functionality.

Where To Go From Here

To learn more about building full stack GraphQL applications, be sure to download my book Full Stack GraphQL Applications. Thanks to Neo4j, you can download the ebook version for free! The book covers more advanced features of the Neo4j GraphQL Library, like adding authorization rules, how to work with mutations, using GraphQL for client state management, and more. You can find the code for this blog post on GitHub.

How to Start a Video Blog (Vlog) And Make Money in 2023

Do you want to start a video blog and make money?

Vlogging is a powerful way to connect with people and build a personal brand. However, if you simply upload vlogs to third-party platforms like YouTube, then you may struggle to grow your audience, make money, and become a successful vlogger.

In this article, we will show you how you can start a vlog and make money.

How to start a video blog (vlog) and make money

Which Is the Best Website Builder for Your Video Blog?

There are many website builders that can help you create a vlog site, but we recommend using WordPress and a separate video hosting platform.

To learn more about why WordPress is such a good choice, please see our complete WordPress review with pros and cons.

There are two types of WordPress software: WordPress.com and WordPress.org. We recommend using WordPress.org, also called ‘self-hosted WordPress.’ This will give you full ownership and control of your site.

Using WordPress.org allows you to install third-party plugins and themes, including plenty that are designed specifically for vloggers.

Also, while you can upload videos to WordPress, it’s far better to use a separate video hosting platform such as YouTube or Vimeo.

Videos take up a lot of your hosting resources, which will slow down your website. Instead, we recommend uploading your vlogs to a separate hosting platform such as YouTube or Vimeo, which has all the server resources you need.

After uploading your vlogs to one of these sites, you can then embed your vlog in a WordPress page or post by simply copying and pasting a link. WordPress has built-in support for most major video hosting platforms.

If you really want to save time and impress your viewers, then you can use a plugin like Smash Balloon to create a video feed that will update automatically every time you post a new vlog.

An embedded YouTube feed, created using Smash Balloon

If you don’t already have a video hosting platform in mind, then don’t worry. Later in this guide, we’ll help you find the perfect platform for your vlogs.

Step 1. Setting Up Your Video Blog Website

To create a video vlog, you’ll need a domain name and web hosting.

Although the WordPress software is free, hosting and domain names are where the costs can really start to add up.

A domain name typically costs $14.99/year and hosting costs start from $7.99/month. This is a lot for hobby vloggers, new creators, or anyone who is working with a tighter budget.

Thankfully, Bluehost has agreed to offer our users over 60% off on web hosting and a free SSL certificate as part of this deal. This is absolutely essential if you plan to sell premium videos and make money from your vlogs. You will also get a free domain name when you sign up!

Simply click the link below to create a vlogging website for as little as $2.75 per month.

Because you get a free domain when you sign up with Bluehost, you’ll need to be sure it’s the right fit for your video blog. For expert tips, check out our guide on how to choose the best domain name.

Once you’ve completed the purchase, you’ll get an email with instructions on how to log in to your web hosting control panel. This is your hosting account dashboard where you can manage your vlog, including setting up email notifications and asking for WordPress support if you need it.

It’s also where you’ll install the WordPress software, so let’s do that now.

Step 2. Install WordPress on Your Video Blog

When you sign up with Bluehost using our link, you’ll get access to a one-click WordPress installer. Simply log into your Bluehost account and click on ‘One Click Install.’

Installing the WordPress software

You can now follow the onscreen instructions to set up WordPress.

If you’re using a different WordPress website host like SiteGround, Hostinger, HostGator, or WP Engine, then you can see our complete guide on how to install WordPress for all the top hosting providers.

Once WordPress is set up, you’re ready to start customizing your vlog site.

Step 3. Select a Video Theme

WordPress themes are professionally designed templates that change how your vlog looks and acts.

There are lots of different premium and free WordPress business themes to choose from. You can generally categorize these as multipurpose WordPress themes, or niche industry themes. However, most WordPress themes are designed to show text.

Since we’re starting a vlog, we need a theme that’s designed specifically for videos.

A WordPress video theme

Even if you’re using a separate video hosting platform, embedded videos still take time to load. With that in mind, it’s important to find a lightweight theme that won’t slow down your website. Wherever possible, we also recommend using a theme that has built-in lazy loading.

On top of that, vlogs often need special features such as parallax scrolling, lightbox popups, and fullscreen video backgrounds.

An example of a WordPress vlog theme

That’s a lot to keep in mind, so you may want to look at our expert pick of the best WordPress video themes.

Another option is to use a landing page builder plugin such as SeedProd. SeedProd is the best drag-and-drop WordPress page builder and comes with more than 180 templates.

This includes an entire section of ‘Webinar’ templates that are designed specifically to show videos on your WordPress website.

SeedProd's professionally-designed vlog templates

SeedProd also has a ready-made ‘Video’ block that you can drag and drop onto any page.

For more information, please see our guide on how to create a landing page with WordPress.

The SeedProd page builder plugin

Once you’ve chosen a video theme, please see our step-by-step guide on how to install a WordPress theme.

After installing a theme, you may want to customize it by going to Appearance » Customize in the WordPress dashboard. This will launch the theme customizer where you can fine-tune the theme settings and see your changes in the live preview.

Customizing a WordPress video blog theme

If you’re using one of the newer full-site editing themes, then you’ll need to go to Appearance » Editor instead.

Here, you can fine-tune the theme using blocks.

Customizing a WordPress vlogging theme using the FSE

Just remember that you can customize your theme at any point. You can even completely change your WordPress theme, if you realize it doesn’t quite meet your needs.

This means you don’t need to finalize your site design now. In fact, it may be easier to fine-tune your vlog once you’ve added some content.

Step 4. Create a Custom Homepage

WordPress comes with two content types called posts and pages.

You’ll typically use posts to create articles and blogs, while pages are static “one-off” types of content. For example, you might publish an about page, a privacy policy, or a custom archive page.

There are a few different ways to show videos in WordPress. However, since we’re creating a video vlog you’ll typically embed one or more videos in a blog post.

By default, the WordPress homepage shows your posts in reverse chronological order, so your latest vlog appears at the top of the homepage.

A custom homepage on a WordPress vlog

However, you may want to move this blog list to another page, and use a custom homepage instead. This custom homepage can introduce your vlog to visitors and let them know what you have to offer.

You might even create a YouTube gallery of all your best videos, which is a great way to catch a visitor’s attention and make them want to watch more of your content.

Smash Balloon allows you to create all kinds of galleries, including showing a specific YouTube playlist or favorites feed, a single video, or even your latest live stream.

Adding a YouTube vlog feed to your WordPress website

For step-by-step instructions on how to create an attention-grabbing homepage for your video blog, please see our guide on how to create a custom homepage in WordPress.

Once you’re happy with the design, it’s time to set it as your homepage. To do this, go to Settings » Reading in the WordPress dashboard.

How to set a custom homepage in WordPress

Here, scroll to ‘Your homepage settings’ and select ‘A static page.’

Next, open the ‘Homepage’ dropdown and choose the page that you want to use.

Changing the homepage on a WordPress video blog

After that, simply scroll to the bottom of the screen and click on ‘Save Changes.’ Now, if you visit your website you’ll see the new homepage in action.

With that done, make sure you create a separate blog page to display your vlogs.

Step 5. Set Up Your Video Hosting Platform

Before you can start adding videos to your WordPress website, you’ll need to upload them to a separate video hosting platform. In this way, you can show countless high-resolution videos on your website without affecting its performance.

For more on this topic, see our post on why you should never upload a video to WordPress.

There are lots of different video hosting platforms that you can use, but we recommend YouTube as it’s the most popular choice.

It’s free to create a YouTube account and you can upload as many videos as you want.

Uploading videos to YouTube

YouTube even has a Partners Program that you can join to make money from your videos. This program also offers more benefits like analytics, longer videos, and editing tools.

Since it’s such a popular platform, there are lots of great WordPress plugins for YouTube. For example, you can use plugins to quickly and easily embed a YouTube playlist in WordPress.

Adding a YouTube playlist to a vlog using Smash Balloon

If you don’t want to use YouTube, then there are many other popular platforms including Vidyard, Wistia, and SproutVideo. For a closer look at all the top video sites, please see our expert pick of the best video hosting sites for bloggers.

After choosing a platform, you’ll need to create an account and upload all the vlogs that you want to show on your WordPress website.

For instructions on how to do this, check out the online documentation for your chosen video hosting platform.

Step 6. Create Your First Vlog

To create your first vlog, simply go to Posts » Add New in your WordPress dashboard.

WordPress has a block-based editor that allows you to create beautiful content layouts for your vlogs. Here, you can add text, images, audio clips, and more.

How to create a new vlog post

For an in-depth look at the editor, please see our WordPress block editor tutorial.

The easiest way to add vlogs to WordPress is by using the built-in auto-embed feature. If you’re using one of the big video hosting platforms, then you can simply paste the video’s URL into the WordPress content editor, and WordPress will handle the rest.

Just head over to your chosen video hosting platform and find the vlog that you want to show on your WordPress blog. You can then simply copy the video’s URL.

After that, switch back to the WordPress dashboard and paste the URL in the content area. If you paste it into a standard Paragraph block, WordPress will automatically try to place it in the correct block, such as the YouTube block.

Embedding a YouTube video in WordPress

Even if you don’t see the platform-specific block, it will use the Embed block and display the video inside the content editor.

For more information, please see our detailed guide on how to easily embed videos in WordPress blog posts.

How to show a YouTube vlog in WordPress

As you’re working on the vlog, you can see how it’ll look to visitors by clicking on ‘Preview.’

This will open the page in a new tab.

How to preview a vlog in WordPress

The WordPress post editor also has sections for Categories and Tags. You can use these to organize your vlogs so it’s easier for visitors to find interesting content. To learn more, please see our guide on how to add categories and tags in WordPress.

When you’re happy with how the vlog looks, go ahead and click on the ‘Publish’ button in the top-right corner of the screen.

To add more vlogs to your website, simply follow the same process described above.

Step 7. Add a Contact Form to Your Vlog

Some viewers might want to contact you directly. This may include affiliate marketers, sponsors, advertisers, and other brands who are looking to build relationships with creators, or other vloggers who want to collaborate.

These people could ring your phone number or send a message to your business email address, but we always recommend adding a contact form to your website.

This makes it easier for potential partners to contact you, so you don’t miss out on any opportunities to grow your brand and make money from your vlogs.

The easiest way to add a contact form to your WordPress website is by using the free WPForms plugin. WPForms comes with a built-in Simple Contact Form template that you can customize using the drag-and-drop editor.

Adding a contact form to a WordPress vlogging site

You can then add the form to any page, post, or widget-ready area using the ready-made WPForms block.

For detailed instructions, see our guide on how to create a contact form in WordPress.

Step 8. Help Visitors Find Interesting Vlogs

Once you’ve added some content to your vlog, it’s a good idea to add a navigation menu so visitors can find their way around the different videos.

Adding a navigation menu to a video blog (vlog)

The exact location of your menu will depend on your WordPress theme. Most themes have several options, so you can create multiple menus and then show them on different areas of your vlog.

Whether you create a single menu or multiple menus, it’s easy to add navigation to your vlog. For a complete guide, please see our post on how to add a navigation menu.

Adding a navigation menu to a WordPress vlog

Menus encourage people to explore your site, but sometimes visitors may want to search for a specific vlog. WordPress comes with a built-in search feature, but it’s quite basic and not very good at finding relevant content.

That’s why we recommend using SearchWP, which is the best search plugin for WordPress.

It is very easy to use and gives much more accurate search results. It allows visitors to search for a keyword in the post or page title, content, URL slug, categories, tags, taxonomies, WordPress excerpts, and even comments.

All of this can help visitors find interesting vlogs, fast.

How to improve WordPress search with SearchWP

For step-by-step instructions on SearchWP, please see our guide on how to improve WordPress search.

Step 9. Optimize Your Vlog for SEO

If you want to get more viewers, then you’ll need to optimize your vlog for SEO. This will help search engines understand your content and show it to people who are looking for videos just like yours.

WordPress SEO is a huge topic that can be confusing for new vloggers. With that in mind, we recommend using All in One SEO for WordPress (AIOSEO).

The AIOSEO SEO plugin

AIOSEO is the best WordPress SEO plugin on the market and has everything you need to get your vlogs onto the first page of Google, without having to learn any complicated SEO jargon.

AIOSEO comes with the easiest setup wizard that helps you choose the best SEO settings for your business. AIOSEO will even scan your vlogs and show an actionable checklist on how you can optimize that specific vlog.

An actionable checklist for improving SEO

Additionally, AIOSEO has a video sitemap feature that you can use to show search engines what’s the most important content to index.

To help you get started, please see our ultimate guide on how to set up All in One SEO for WordPress correctly.

Step 10. Notify Users About New Vlogs

Did you know that 70% of people who leave your site will never come back? Thankfully there are lots of ways to turn abandoning visitors into loyal viewers.

To start, it’s smart to create an email newsletter so people who enjoy your vlogs can subscribe. After that, you can email these subscribers every time you post a new vlog.

You can also keep them engaged with your brand by sending them fun surveys and polls, notifying them about any giveaways and contests you’re running, or even simply asking them for feedback on your latest vlog.

An example of an online giveaway or contest

All of this can help you create a sense of community and build a stronger relationship with your viewers.

If you do build an email list, then you’ll want to make sure your messages arrive safely in the subscriber’s inbox and not in their spam folder. With that in mind, we recommend using an SMTP service provider to improve your email deliverability rates.

Another option is to use push notifications with software like PushEngage to send targeted, personalized messages to viewers after they leave your vlog.

Push notifications are short, clickable notifications that appear as a popup on the user’s desktop or mobile devices. Some of the biggest websites in the world use push notifications to keep users engaged, including Facebook.

These notifications go directly to the user’s web browser or mobile device so they have a high chance of getting the person’s attention, which makes them perfect for notifying viewers when you post a new vlog.

To learn more, see our guide on how to add web push notifications to WordPress.

Step 11. How to Make Money From Your Video Vlogs

Creating lots of quality, engaging vlogs takes a lot of time and effort, so you may want to make money from your videos.

If you’ve created a contact form, then potential sponsors and partners already have a way to contact you, which is a great start. However, there are lots more ways to make money online with WordPress.

Here are some of the best ways to make money from your vlog.

  1. Google AdSense

There are many reasons why it’s smart to embed videos on your own website, rather than simply uploading them to platforms like YouTube.

One major benefit is that you can show Google AdSense ads next to your videos.

Google AdSense

When you sign up for Google AdSense, Google acts as a middleman between you and the advertiser. Instead of you having to find the right partners for your vlog, Google allows advertisers to bid for keywords matching your content. This allows you to get the best possible rates for the ads on your vlogging website.

For more details, please see our article on how to properly add Google AdSense to your WordPress blog.

  1. Affiliate marketing

Many vloggers make money by recommending products and services to their viewers. For example, many lifestyle vloggers film daily routine videos showing off their favorite skincare or fitness products.

By using affiliate links, you can earn money every time a viewer buys a product or service based on your recommendation.

For the best results, it’s a good idea to only recommend quality items that you already use and trust. If you encourage viewers to buy poor-quality or scammy products, then you’ll damage your band and almost certainly lose viewers.

There are plenty of affiliate marketing plugins and tools for WordPress that can help you make money by promoting affiliate products, but we highly recommend PrettyLinks or ThirstyAffiliates to all vloggers.

To get started, please see our step-by-step affiliate marketing guide for beginners.

  1. Ask for Tips and Donations

If you build a strong, positive relationship with your viewers then they may want to support your work as a vlogger. This is particularly true if you’re a hobby vlogger or someone who is just starting out.

Although they’re mostly used by non-profits, some vloggers use donation forms so that viewers can support their work. These forms are often presented as ‘buy me a coffee’ or ‘buy me a beer.’

An example of a donation form

To learn more, please see our guide on how to create a donate form in WordPress.

  1. Create a Membership Site

Most of the time, you’ll want your vlogs to be publicly available so you can get as many views as possible and build your audience.

However, some vloggers may want to create a video membership site in WordPress. This allows people to pay for different perks, such as early access to the latest vlogs, exclusive live streams, or premium members-only videos.

You can also offer perks that don’t involve videos, such as a members-only forum, blog posts, or the ability to chat with you directly on channels like Discord.

The easiest way to create a membership site is by using MemberPress. It is the best WordPress membership plugin on the market and allows you to accept payments, create unlimited subscription levels, restrict access to video pages based on levels, and more.

Creating video memberships with the MemberPress plugin
  1. Sell Your Videos as Digital Downloads

Depending on the kind of vlogs you create, you may decide to sell some of your premium videos as digital downloads. For example, if you’re a health and fitness vlogger then you might create videos teaching your followers different exercise routines.

For some niches, this can be a way to monetize the audience you’ve built from your vlogs.

Easy Digital Downloads is the best platform to easily sell digital products. You can get started in minutes and accept credit card payments with Stripe, PayPal, Google Pay, and Apple Pay.

The Easy Digital Downloads WordPress eCommerce plugin

With Easy Digital Downloads, you have complete control over how you distribute your videos. You can allow customers to download files as many times as they want or restrict file downloads by time or attempt.

To start selling your premium videos, please see our complete guide on how to sell digital downloads on WordPress.

We hope this tutorial helped you learn how to start a video vlog and make money. You may also want to learn how to increase your blog traffic or check out our list of the best email marketing services.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Start a Video Blog (Vlog) And Make Money in 2023 first appeared on WPBeginner.

What is best method for link building nowadays?

The best methods for link building include creating high-quality content, guest blogging, broken link building, social media promotion, and influencer outreach. Quality is more important than quantity, and it's important to stay up-to-date with changes in search engine algorithms.