Wordpress Restore

I have lost Apache Webserver and MySQL Database Server. They won’t start. Don’t know what could have happened.I tried different ideas but no luck so I moved my my websites to a new hard drive.

I managed to move my 17 other websites to a new hard drive, but what is the best way to move the Wordpress folder? I originally installed Wordpress using Virtualmin script.

Local server.
Ubuntu 20.04.4
Webmin 1.991
Virtualmin7.04

I have successfully moved WordPress using a free plugin called Duplicator.

Thanks for your help my friend. I shall try it out and fill you in.

This doesn’t make sense.

Services not starting is not, in and of itself, any indication of hardware failure. If you post the relevant errors/log entries about why they won’t start, we can help you.

I gathered some info from the logs:
1.Job for apache2.service failed because the control process exited with error code.
See “systemctl status apache2.service” and “journalctl -xe” for details.

When I try to restart Apache with command line I get this message.
Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
See “systemctl status apache2.service” and “journalctl -xe” for details.

This is the info I get for MySQL
Error! MySQL is not running on your system - database list could not be retrieved.
/usr/bin/mysqlshow: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

I can’t even migrate WordPress because Mysql is Kaput

Post httpd error log might help more

did you try a restart, logs rotate. Also did you use the icon next to View to locate the file.

Neither of those is all that worrying. Definitely not indicative of hardware failure.

Stop being dramatic. There are all sorts of minor reasons either of these services would fail to start, but we need to see the relevant log entries for why.

Try to restart the service from the command line (an ssh session, not the Webmin command shell). And, then look at the error_log for Apache and /var/log/mariadb/mariadb.log for relevant entries about why it’s failing to start.

I restarted with logs rotate. Still empty.
When I restart Apache from command Line I get:

May 28 19:10:34 ubuntu systemd[1]: Starting The Apache HTTP Server…
May 28 19:10:49 ubuntu apachectl[1043]: AH00526: Syntax error on line 82 of /et>
May 28 19:10:49 ubuntu apachectl[1043]: Invalid command ‘php_admin_value’, perh>
May 28 19:10:49 ubuntu apachectl[975]: Action ‘start’ failed.
May 28 19:10:49 ubuntu apachectl[975]: The Apache error log may have more infor>
May 28 19:10:49 ubuntu systemd[1]: apache2.service: Control process exited, cod>
May 28 19:10:49 ubuntu systemd[1]: apache2.service: Failed with result 'exit-co>
May 28 19:10:49 ubuntu systemd[1]: Failed to start The Apache HTTP Server.
lines 1-14/14 (END)

Output from journalctl -n 1000:
May 28 19:29:07 ubuntu audit[17940]: AVC apparmor=“DENIED” operation=“open” profile="/usr/sbin/mysqld" name="/proc/17940/task/18021/mem" pid=17940 comm=“ib_srv_wkr-1” requested_mask=“r” denied_mask=“r” fsuid=112 ouid=112
May 28 19:29:07 ubuntu kernel: audit: type=1400 audit(1653787747.196:270): apparmor=“DENIED” operation=“open” profile="/usr/sbin/mysqld" name="/proc/17940/task/18021/mem" pid=17940 comm=“ib_srv_wkr-1” requested_mask=“r” denied_mask=“r” fsuid=112 ouid=112
May 28 19:29:07 ubuntu systemd[1]: mysql.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 28 19:29:07 ubuntu systemd[1]: mysql.service: Failed with result ‘exit-code’.
May 28 19:29:07 ubuntu systemd[1]: mysql.service: Scheduled restart job, restart counter is at 235.
May 28 19:29:07 ubuntu systemd[1]: Stopped MySQL Community Server.
May 28 19:29:07 ubuntu systemd[1]: Starting MySQL Community Server…

One line of dmesg log:
[ 2364.313152] audit: type=1400 audit(1653788834.803:514): apparmor=“DENIED” operation=“open” profile="/usr/sbin/mysqld" name="/proc/32726/task/32764/mem" pid=32726 comm=“ib_srv_wkr-1” requested_mask=“r” denied_mask=“r” fsuid=112 ouid=112

Well the apache issue is a well know bug.

Manually removing php_* lines form httpd.conf should resolve the issue.

Thanks to both of you! We’re on the right track I’m sure. Let me work on this and I will let you know tomorrow how I did.
Thanks