WordPress 6.7 is not using your language files – solution
-
Here is a quick solution to the problem with the location of language files with translation in WordPress 6.7 – which I myself have successfully used:
A ready-made bash script that automatically moves the language files on the whole server from the plugin folder, to the system folders.As a result, you don’t need to do anything else on the sites themselves (even if there are a lot of them)? ??
Place in the root of the server (or user directory) and run.All processes are logged.
P.S. Or just move your files manually: from ‘/wp-content/languages/loco/plugins/’ to ‘/wp-content/languages/plugins/’, and from ‘/wp-content/languages/loco/themes/’ to ‘/wp-content/languages/themes/’
#!/bin/bash
# Set the log file to the current directory
LOG="$(pwd)/logfile.log"
# Function for logging
log_message() {
echo "$(date +'%Y-%m-%d %H:%M:%S') - $1" >> "$LOG"
}
# Recursive directory traversal
find . -type d -path "*/wp-content/languages/loco/plugins" | while read -r dir; do
# Move files from /wp-content/languages/loco/plugins/ to /wp-content/languages/plugins/
target_dir="$(echo "$dir" | sed 's|wp-content/languages/loco/plugins|wp-content/languages/plugins|')"
mkdir -p "$target_dir"
mv "$dir"/* "$target_dir"
log_message "Moved files from $dir to $target_dir"
done
find . -type d -path "*/wp-content/languages/loco/themes" | while read -r dir; do
# Move files from /wp-content/languages/loco/themes/ to /wp-content/languages/themes/
target_dir="$(echo "$dir" | sed 's|wp-content/languages/loco/themes|wp-content/languages/themes|')"
mkdir -p "$target_dir"
mv "$dir"/* "$target_dir"
log_message "Moved files from $dir to $target_dir"
done
echo "Script completed."
- You must be logged in to reply to this topic.