update remote wordpress from localhost

Migrate DB is a good tool, even in its free version. You can follow these steps:

  • create a database in remote and import there the local wordpress database, changing some data with Migrate DB (tipically you have to convert the local server path https://localhost/your-local-path/wordpress to //your-remote-path/wordpress, and the local absolute path (such as /mnt/your-PC-path/wordpress) to the remote absolute path (such as https://your-remote-path/wordpress);
  • upload the local wordpress folder to your remote website, via FTP;
  • change in the uploaded folder the wp-config.php file, according to the db user, db name and db server of the remote wordpres database;
  • go to the remote wordpress, login (user and password are identical to the your local wordpress ones), and go to Migrate DB -> settings, and there -> generate/reset API key, copy the 32 char key and paste it in the local Migrate DB push box.
  • So your connection should work, syncing the remote database with the local one.

A problem could arise using Wordfence Security: to update with MigrateDB, you could have to disable temporarliy Wordfence.

rename identical files (with different names) in different devices

You can use a zsh script (let we call “rename-identical-files.bash”) with a code like the following

#! /bin/zsh -
zmodload zsh/stat || exit
typeset -A size_to_name
model_folder=${1?}

CDPATH= cd -P -- "$model_folder" || exit
for f in *(ND.); do
  stat -LA size +size -- $f &&
    size_to_name[$size]=$f &&
    print -r "# File of size $size should be named ${(q)f}"
done

cd $OLDPWD || exit
for f in *(ND.); do
  stat -LA size +size -- $f &&
    (($+size_to_name[$size])) &&
    [[ $f != $size_to_name[$size] ]] &&
    print -r mv -i -- ${(qq)f} ${(qq)size_to_name[$size]}
done
#usage:  that-script /model-folder-path

then you can go to the folder where you want rename the files and do this terminal command:

~/rename-identical-files.bash /path/to/model/folder

in this way, before executing the command, you can see what could happen afterwards. If it’s all ok, do the command:

~/rename-identical-files.bash /path/to/model/folder | sh

cfr. https://unix.stackexchange.com/questions/627319/avoid-spaces-and-apostrophes-problems-with-ls-in-a-awk-script#627328

Krusader: per sincronizzare

all’inizio

si può aprire da terminale Krusader scegliendo quale pannello debba stare a sinistra e quale a destra, ad esempio
“krusader –left /path –right /media/path”

escludere certi (tipi di) files dalla sincrinizzazione

In file filter anteporre | al tipo di file. Ad esempio “| *.ini” per escludere dalla sincro i files con estensione ini.