WordPress query single post by slug
For the moment when I want to show a single post without using a loop I use this:
<?php
$post_id = 54;
$queried_post = get_post($post_id);
echo $queried_post->post_title; ?>
The problem is that when I move the site, the id's usually change. Is there a way to query this post by slug?