diff --git a/actions/wordpress b/actions/wordpress index 45397027e..fe9fb2aa0 100755 --- a/actions/wordpress +++ b/actions/wordpress @@ -18,6 +18,7 @@ from plinth import action_utils from plinth.modules.wordpress import PUBLIC_ACCESS_FILE _config_file_path = pathlib.Path('/etc/wordpress/config-default.php') +_static_config_file_path = pathlib.Path('/etc/wordpress/freedombox-static.php') _db_file_path = pathlib.Path('/etc/wordpress/database.php') _db_backup_file = pathlib.Path( '/var/lib/plinth/backups-data/wordpress-database.sql') @@ -48,6 +49,9 @@ def parse_arguments(): def subcommand_setup(_): """Create initial configuration and database for WordPress.""" if _db_file_path.exists() or _config_file_path.exists(): + if _config_file_path.exists(): + _upgrade_config_file() + return db_password = _generate_secret_key(16) @@ -63,6 +67,7 @@ def _create_config_file(db_host, db_name, db_user, db_password): config_contents = f'''