Unable to create directory

the title was “WordPress: Unable to create directory”, but unfortunately, error “unable to create directory” occurred with trying to add theme, plugin, media file, update WordPress or any other websites uploaded with sftp

First step is to add the current user to the group www-data (Apache):

sudo gpasswd -a "$USER" www-data

sudo chown -R “$USER”:www-data /var/www – not sure in this step

Change the rights for group for modifications and executions

(more…)

Change default Python version (Obsolete)

Change to default python3 version on Raspberry Pi OS:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2

# check the list 

sudo update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.7

# Change the default version

sudo update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /usr/bin/python3.7   2         auto mode
  1            /usr/bin/python2.7   1         manual mode
  2            /usr/bin/python3.7   2         manual mode

Press <enter> to keep the current choice[*], or type selection number:

# now Python 3 is default

python
Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Source: Change default python version on Raspbian GNU/Linux – LinuxConfig.org

Upgrade/Install phpMyAdmin on Debian

Rule #1: “Do not fix, if it’s not broken”
I’ve had version phpMyAdmin 5.0.2 since 2020 without any problem (PHP 7.+, 8.0) until I decided to look at PHP 8.1. Number of “Deprecated” messages from twig/twig package just killed the system, and Composer failed to update outdated packages.
Rule #2 extends #1: If you do not have a VERY GOOD REASON to use PHP 8.1, stay with the current version

(more…)
Yandex.Metrica