Over the years, I've worked on building search traffic for two kinds of sites.
The first, was working for companies that already had hundreds of thousands or millions of monthly users and were trying to build their traffic via a team of writers. I did this first for Verbling (as a side component to my work as a full-time dev), and then later for Codementor, as a remote growth consultant.
The second, was my own sites or apps where 100% of the content was produced by me. I've also helped several other independent solo-founders do essentially the same for their own projects. Today's advice is for 2nd type of site—the ones with just one writer.
For a quick point of reference, I'll what I'm currently working on so you can get an idea of how applicable my experience is or isn't to you: Alchemist Camp. It targets an extremely small programming niche and is hovering around Alexa 700k (10-15k uniques/month with decent visit time). I add new content about once a week. Previously, I built a considerably larger personal blog that peaked at about Alexa 300k, but it's no longer up.
# Work with the search engine
There's a lot of competition for attention from search engines and an entire industry of people trying to game them. It's possible to do that successfully in the short term, but people who do that generally get crushed when new search ranking updates. The more egregious marketers sometimes get penalized or banned entirely.
There are certain technical SEO basics to pay attention to, such as having a reasonable site structure, a sitemap and appropriate meta-tags. I'm going to assume you've got that covered. WordPress or any other modern CMS will do an adequate job out of the box.
So with the above assumptions, what's a good way to cut through the competition?
# Pay attention when a search is frustrating
The single most successful strategy I've found for getting search engine traffic for a more niche site has been to pay very close attention when something is difficult to find online. This isn't very difficult to do, since it's easy to notice when something is frustrating. The key is to be aware and take notes.
Look at your browser history and write down the exact queries you typed into Google, Duckduckgo or your search engine of choice. Ask yourself what you were hoping to find online and why you tried each query after the first.
# Create what you hoped your search would find
Then, after you've learned what you were trying to learn during your frustrating search, create the very thing you were trying to find.
Usually a search is difficult because the ideal answer doesn't exist in a single document online or video. Instead, finding the answer involves piecing the information together from numerous sources. If that was the case with your frustrating search, then the next step is to create the answer to the search and publish it.
Occasionally after a long and frustrating search, you will find a single resource that answers exactly what you wanted. In this case the question is, "Why didn't my first several searches return this document?" Maybe it used different terminology than you did. Maybe it was comment on an ancient forum post. Maybe it was on an extremely slow site. Make your own version of the resource you finally found, but fix whatever issue made it difficult to find.
# An example
One direct example of using this strategy was when it took me about 20 minutes of searching to find out how to do a certain kind of query with Elixir's main DB-related library, Ecto. Elixir maps are stored in Postgres as JSONB fields, and I wanted to query fields within the JSONB.
I saw I'd made 8 searches, starting with "query nested fields of a map ecto". Ultimately the whole answer to what I was looking for was split between a Thoughtbot post, a Stack Overflow answer and a Postgres documentation page.
Then I wrote a short article called, Querying nested fields of a map with Ecto that contained exactly the information I'd been looking for, and it's since brought in a thousand visitors from search in under a year.
# Why does this work?
This strategy tends to be stable because it works with the search engine and doesn't tend to get crushed by updates the way more aggressive techniques do. It leads to creating genuinely helpful resources for people to find online and Google has every incentive to return them in its results.
Content created this way tends to rank well because the entire strategy revolves around escaping competition. If there is a lot of competition around a query, it's generally well-answered and you'll find an adequate (though possibly spammy, advertising-stuffed) result within a search or two. The searches that are really frustrating are usually not going to have much competition.
Unless your interests are truly rare, others will search for what you did and find your page.