If you need to change the Site URLs of your WordPress installation you can do this by connecting to the server through the command line. This works if you are running MariaDB or MySQL.

Connecting to the server

To connect to your server on localhost run the following command. This will give you a prompt for the password.

mysql -u root -p

If you want to connect to a different server add the flag -h.

mysql -h -u root -p

If you need to connect to the server running inside a docker container run directly:

sudo docker exec -it srv_data-mariadb-1 mysql -u root -p

or separately:

sudo docker exec -it srv_data-mariadb-1 bash

and then:

mysql -u root -p

Change the WordPress siteURL

The siteURLS on a WordPress installation are stored in different locations inside your database. To change them run the following commands. This will also work if you want to change the protocol from http:// to https://.

UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');

You may also want to change the siteURL in your wp-admin settings.

Settings > WordPress-Adresse (URL)
Settings > Website-Adresse (URL)

Instead of doing this inside the admin section you can also change the URL by editing the wp-config.php file by adding the following lines:

define( 'WP_HOME', 'http://www.390degre.ch' );
define( 'WP_SITEURL', 'http://www.390degre.ch' );