• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Store
  • Support
  • My Account
  • Cart

9seeds

Building Custom WordPress Solutions | Plugin Development

 
  • Custom Development
  • Themes
  • Plugins
  • About
  • Contact
  • Blog

WP Engine

How to change WordPress permalink structure on WP Engine

Posted on December 20, 2016

One of the most user friendly and powerful SEO features of WordPress has always been it’s pretty permalinks feature. Many content management systems (CMS) still to this day have urls that look like http://domain.com/something_incomprehensible/123123c1. Ugly!

WordPress has supported pretty permalinks (human readable and ending a url with a slug resembling the post name) since version 1.0. There was one catch to those however. You needed to include a date in the format before the post slug (that’s /%year%/%monthnum%/%postname%/ for those familiar with WPs permalink formats). This resulted in URLs like this post’s URL: https://9seeds.com/2016/12/19/change-permalink-structure-wp-engine. Pretty!

That format has always still been better for SEO than what other CMSs do with crazy random numbers that mean nothing to human or search crawlers. It’d be a little better without the dates in the way however. You could use just the post slug (that’s just /%postname%/ ) on small brochure websites with just a few dozen pages, but on sites with large numbers of posts things would slow down without dates to break things up.

As of WordPress 3.3 there is no longer any performance hit to using just /%postname%/.  So your URLs can just look like this:  https://9seeds.com/change-permalink-structure-wp-engine/.  Prettier!

But there’s still a catch. You can’t just go into the WordPress Permalinks settings page and change formats or incoming links to your site using the old format may 404 🙁

There’s long been a fix for this and our friend Yoast even built a tool to make generating the needed .htaccess rule here since no one likes writing regex or coming up with htaccess rules.  That’s all well and good if you’re on a simple Apache server and want to edit an .htaccess file, but what if you’re on WP Engine? WP Engine uses a higher performance setup with an Nginx proxy in front of Apache. That means you can put those redirect rules into Nginx and they’ll be even quicker than having put them in .htaccess!  Only you can’t directly modify your nginx.conf files on WP Engine, instead WP Engine gives you a super easy to user redirect tab in their panel.

 

Here’s how you change your permalink structure and setup the needed redirect on WP Engine.

Step 1:

Go to Yoast’s handy tool here and generate the needed rewrite rule. It’ll look something like this:

RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(?!page/)(.+)$ https://your-domain.com/$4

If you’re not on WP Engine you can drop that into your .htaccess file before the WordPress section. In fact it’ll work on WP Engine, just it’s better to use the panel than to modify that file directly via FTP.

Step 2:

1. Go to the WP Engine Dashboard and click Redirects rules in the left sidebar

2. Click the Redirect Rules button at the top right

3. Set a memorable name for the Redirect.

4. Take the orange section above, the scary looking Regular Expression that Yoast generated for you (mine is for year/month/date, your maybe be shorter if your existing permalink structure is shorter), paste that into “Source*” from the ^ to the $.

5. Take the blue section above, the less scary url looking Regular Expression from the http to the $4 (my existing permalink has three date modifiers, hence it keeps the 4th chunk, your’s may be different if you’re using a shorter permalink structure).

6. Click the Save button

Step 3:

1. Go to your WordPress dashboard and click on Permalinks under Settings in the left sidebar

2. Change your permalink setting to %postname%

3. Click the Save Changes button

Step 4:

Test!

 

Success? Awesome let us know in the comments below!

Continue Reading

Jon Brown

    More by Jon Brown

    Footer

    Get in Touch

    • New Project Inquiry
    • Product Support and General Inquiry
    • Store Purchase Terms and Conditions
    • Store FAQ
    • Cookie Policy
    • Privacy Policy

    Our Services

    • Custom WP Development
    • Theme Store
    • Plugin Store

    WordPress Plugins for Sale

    • Time Tracker
    • Authorize.net SIM Gateway

    WordPress Plugins for Free

    • Simple Calendar
    • WP Chargify
    • Facebook
    • Twitter
    • LinkedIn
    • WordPress
    • GitHub

    Copyright 2023 | 9seeds, LLC

    Like nearly all websites this one uses cookies too. Like most users we think consent banners like these are a dumb solution, but it's what we've got until new laws are passed. We use cookies on our website for remembering your preferences, for example if you're logged in or what is in your cart. We also use 3rd party cookies for analytics so we know what pages on the site are most popular. By clicking “Accept”, you consent to the use of ALL the cookies.
    Do not sell my personal information.
    Cookie SettingsAccept
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience and may even preclude you being able to login to the website.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
    CookieDurationDescription
    __stripe_mid1 yearThis cookie is set by Stripe payment gateway. This cookie is used to enable payment on the website without storing any patment information on a server.
    __stripe_sid30 minutesThis cookie is set by Stripe payment gateway. This cookie is used to enable payment on the website without storing any patment information on a server.
    cookielawinfo-checkbox-advertisement1 yearSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
    cookielawinfo-checkbox-analytics1 yearSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Analytics" category .
    cookielawinfo-checkbox-necessary1 yearSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Necessary" category .
    cookielawinfo-checkbox-others1 yearSet by the GDPR Cookie Consent plugin, this cookie is used to store the user consent for cookies in the category "Others".
    cookielawinfo-checkbox-performance1 yearSet by the GDPR Cookie Consent plugin, this cookie is used to store the user consent for cookies in the category "Performance".
    Functional
    Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
    Performance
    Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
    Analytics
    Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
    CookieDurationDescription
    _ga2 yearsThe _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
    _gid1 dayInstalled by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
    CONSENT2 yearsYouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
    Advertisement
    Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
    CookieDurationDescription
    VISITOR_INFO1_LIVE5 months 27 daysA cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
    YSCsessionYSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
    yt-remote-connected-devicesneverYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
    yt-remote-device-idneverYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
    Others
    Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
    CookieDurationDescription
    cookielawinfo-checkbox-functional1 yearThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
    SAVE & ACCEPT
    Powered by CookieYes Logo