Preserve Language Files After Update

Preserve Language Files After Update

One of most annoying thing happened to us is when we update our WordPress plugins or Themes we always lost our translations 🙁

I know how much time one spend translating plugin or theme specially first time 🙂

Today I will show you how you can prevent your languages files being overridden after a plugin/theme update and where you must put your languages (.po, .mo) files.

Its quite simple and quick then you think!

For plugins:

  1. Create “languages” folder in wp-content folder via FTP program ( e.g. FileZilla) or cPanel file manager.
  2. Create “plugins” folder in languages folder that you created in first step.
  3. Now move any plugin’s translation files in this folder

For themes:

  1. Create “languages” folder in wp-content folder (omit if you already created this folder for plugins).
  2. Create “themes” folder in languages folder.
  3. Now move any theme’s translation files in this folder

 

See the structure/herirarchy of these directories/folder in below image. Directory structure

 

 

Conclusion:

Now WordPress will load translation files from these folders and will not override languages (.po, .mo) files when you will update your themes and/or plugins 🙂

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Inline
Inline