Answer the question
In order to leave comments, you need to log in
How to make language additions remain after disabling the plugin?
I have WPML installed on my site. Each specific page has a URL of type site.net/lang/page, that is, for Russian I have a site.net/ru/page page, for English, respectively, site.net/en/page . That is, the slugs after the language prefix are the same. This works well given that each page is actually in its own subdirectory, and doesn't conflict with the other. But if you disable the plugin, the pages lose their subdirectories and start to conflict.
It turns out such a trash:
After the plug-in is disabled, the prefixes "ru" and "en" disappear, respectively.
Pages that had "page" slugs become "page-2" in the editor (both). But these pages are not saved, they actually become drafts. And you can’t get to the page by such a slug.
When trying to go to the site.net/en/page page (for example, to en), we get 404.
When we try to go to site.net/page, we get an auto-redirect to site.net/page-2 and 404, because this page does not exist. Getting to site.net/page is not possible. Because there is no more page under this slug, under site.net/page-2 we have two non-working pages.
But further worse. If you accidentally update one of the pages (for example, the plugin crashed, and someone was working with the page at that moment), then it will receive the /page slug, after which the second one will receive the /page-2 slug.
After enabling the plugin, these pages will still be linked, but one will be /page and the other /page-2. Accordingly, all internal and external links will go to a non-existent url, which, at the same time, stops redirecting to a new one (well, it’s clear why it should be redirected).
To avoid embarrassment, if the plugin fails for some reason and the links are accidentally overwritten, it is necessary that after the plugin is disabled, the pages still have urls with language subdirectories, albeit not fully working. How can this be achieved? Maybe there are some ideas?
Answer the question
In order to leave comments, you need to log in
Why are you enabling and disabling the plugin? The WPML plugin works great. If you want the site to remain multilingual even after disabling the plugin, then you probably should have implemented it without the plugin in the first place.
For example, WPMS (multisite), in each /en /ru subdirectory there will be one VP site. And here the WPML plugin will not be needed at all. Then it remains just to correctly create a link between sites and that's it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question