Problem: The client wants to change the default language folder from /en/ to /us/ on their WPML-configured website without duplicating pages. Additionally, they encounter a 401: Unauthorized error when attempting to set /us/ as the default folder. Solution: We recommend two approaches to address this issue: 1. Create a custom language: - Add a new custom language with the code /us/. - Duplicate your existing pages into this new language. - Set this new custom language as your default in WPML → Languages. 2. If no translations have been added yet, reconfigure WPML from scratch: - Fully reset WPML. - During the setup wizard, add the custom language with the /us/ code and set it as the default. - Once configured, all your pages will appear under the /us/ language. To reset WPML, follow these steps: - Go to WPML → Support and click the Troubleshooting link. - In the Reset section of the Troubleshooting page, select the 'I am about to reset all translation and language data' checkbox. Then, click the 'Reset and deactivate WPML' button. - For detailed instructions, visit WPML Reset Documentation. Before making any changes, please ensure to back up your database and site files.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.