In our WordPress image, we deploy a new installation with the latest version of the popular CMS. For this task, we use WP-CLI, which handles installing and configuring everything related to WordPress.
Via SSH, you can manage all kinds of information, as well as activate and deactivate plugins or themes and manage users.
In the following tutorial, we explain how to configure an email address for the user you use to access WordPress so you can recover your password, for example.
From the WordPress panel
Access WordPress and go to Ajustes > Generales:
By default, our image configures a nonexistent email address called clouding@changeme.com to generate the installation. You can easily change this email address by entering your own and clicking Guardar.
After saving, you will need to accept the confirmation of the email change:
For this process, it is important to have configured SendMail on the WordPress server.
You will receive an email to confirm the change:
From the command line using WP-CLI
Connect to your server via SSH and run the following:
wp user update WPadmin --user_email=micorreo@midominio.es --allow-root --path=/var/www/html/wordpress/After running this, you will get the following:
Success: Updated user 1.From the database [For experienced users]
You can also make the change by modifying the database, either from the command line or by accessing it through phpMyAdmin.
If you connect via SSH, you can do this by connecting to MySQL:
mysql -u wordpress wordpress -pIf you select the users table, you will see the following:
MariaDB [wordpress]> select * from wpimp_options where option_id = 6;
Here you can run the following to update the email field:
MariaDB [wordpress]> UPDATE wpimp_options SET option_value = "soporte@clouding.io" WHERE option_id = 6; Where wpimp_options is the users table, option_value is the field to modify, and ID = 6 is the ID corresponding to the field where the administrator email is stored.