How to Change the Default Search URL Slug in WordPress

Are you looking to change your search URL slug in WordPress? WordPress search URLs are not user friendly normally and some users want to change this for SEO or other reasons. In this video, we will show you how to easily change the default search URL slug in WordPress to make it SEO and user friendly.

Normally the search URL starts with a question mark with text afterward which can be mildly confusing when viewing and not always the best for SEO. The difference between this URL structure and the normal URL structure can also be a strange experience for visitors.

For this tutorial, we will be recommending you use FTP to edit your files. If you do not know how to use FTP we would recommend taking a look at our article:

The first method we will be editing the functions file for your theme. You would want to create a child theme so your changes are not removed when your theme updates. For creating a child theme you would want to take a look at:

Your functions file you would want to go into the wp-content folder then the themes folder and find the folder with your theme’s name on it. Next, open the file with the text editor of your choice, we use Notepad++ in this video. Download the file from your live site, make your changes at the bottom of the file, and reupload the functions.php to your site.

A second option would be to edit your htaccess rather than your theme’s functions file so the setting stays if you change themes. You would want to go back to the root folder by using the ellipses(…) or double dots depending on your FTP program until you see the folders wp-admin and wp-content. Here you should see the .htaccess file to edit, if not you would want to show hidden files in your FTP program.

Text version of this tutorial

If you liked this video, then please Like and consider subscribing to our channel for more WordPress videos.

Check us out on Facebook

Follow us on Twitter

Check out our website for more WordPress Tutorials


Leave a Reply

Your email address will not be published. Required fields are marked *