Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

This topic contains 3 replies, has 2 voices.

Last updated by Bobby 1 year, 10 months ago.

Assisted by: Bobby.

Author Posts
July 18, 2023 at 2:17 pm #14060047

michaelW-121

Hi,

I have a website in English and Spanish using WPML - however the Spanish website is no longer useful and I can't maintain it.

I need to remove / hide the Spanish site for now and also redirect the ES website to the EN version. No pages on ES should be accessible but they shouldn't 404, they should 301 redirect.

What's the easiest way to do this using WPML?

July 18, 2023 at 6:33 pm #14061815

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Based on what you described it might be best to Hide the language.

To do this leave WPML activated and go to WPML-> Languages -> Hide languages and hide the Spanish language.

The content will automatically redirect to the default language.

Related Documentation: https://wpml.org/documentation/getting-started-guide/language-setup/hiding-languages-on-the-front-end/

Otherwise, If you are no longer using the ES translations, as this is the only other language on the site you could deactivate WPML.

This will remove the /es/ directory and the pages will no longer be connected. Do keep in mind that the pages will still exist.

For the redirects, you could use a third-party plugin to handle this and set redirects for the /es/ content.

Let me know your results, please.

July 19, 2023 at 8:06 am #14063121

michaelW-121

Hi, thanks for the response. How is the redirect added? Is it a 301 redirect?

July 20, 2023 at 6:49 am #14069297

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

It would be a 302 redirect.

You can see it live in this sandbox:
hidden link

hidden link

HTTP/1.1 302 Found
Server: nginx/1.22.1
Date: Thu, 20 Jul 2023 06:48:59 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Redirect-By: WPML
Location: hidden link

The topic ‘[Closed] Hide language and redirect it’ is closed to new replies.