fbpx

Why can’t I change my slugs?

Following numerous requests to offer the ability to change the ‘slug’, I wanted to give some background, explain some of the challenges and answer some of the most common questions.

What are slugs?

Slugs refer to the part of the web page’s address that appear after the domain name. A simple example might be https://spacesengine.com/spaces, where https://spacesengine.com is the domain name, and spaces is the slug.

Why do they pose such a problem?

Slugs are deeply embedded into a website. They are the key to the door of every page you see. In much the same way as when you try to use a different key in the front door of your home, an incorrect slug means you cannot go any further. You are literally locked out.

But you can change the slugs for other plugins, right?

Spaces Engine is deeply integrated with BuddyBoss, arguably more so than any other plugin available. As a BuddyBoss component, it relies on the functionality such as the activity feed, members, messaging, moderation and so on.

When BuddyPress (the software BuddyBoss is based on) was conceived, there was no native way of changing the slugs of it’s components. In fact, this is still true today – if you look through the BuddyBoss settings page, you won’t see the ability to change the slug for groups, friends, activity and so on. One of the main reasons for this is the way URLs are written to the database. The slug is ‘hard-coded‘ for many components, so when BuddyBoss needs to locate something later on, it is specifically looking for that exact URL.

An example of a database at the heart of a website. Note the ‘spaces’.

So fundamentally, changing the slug within the BuddyBoss environment is extremely challenging and potentially disastrous for a website. Just like the impact of not being able to get into your own home, your site could potentially go offline.

I read about adding code into a php file?

Within the world of BuddyBoss, this remains the only approved way of changing BuddyBoss components. You can read more about it here. But the important part of this approach is that this is not a native option offered by BuddyBoss. This would be custom development, and therefore support is not offered. This makes perfect sense, as (for all the reasons above) the support burden would be huge.

So are there any options?

We are investigating making Spaces compatible with 3rd-party slug changing tools. These are complex tools that find workarounds to the database issue. They are created by developers who specialise in slugs and all the issues that surround them. We will announce our progress on this as soon as we can. However, as you would expect, we would not be able to provide any support for any changes made via these tools.

I’m not interested in the slugs in the website address. I want to change ‘spaces’ everywhere it’s written on my site.

We’ve got you covered! Everything we have talked about so far only affects the website address. If you want to change the name of Spaces to something else on your pages, you can already do this from the Spaces setting page.

I hope this short article has explained the challenges that slugs create. It is unfortunately one of the aspects of WordPress that seem like such a simple, basic thing, but actually have an immense impact on how your whole website functions.