How to add new admin Joomla user via mysql command line

Update prefix to your own

INSERT INTO `js_users` (`name`, `username`, `password`, `params`, `registerDate`, `lastvisitDate`, `lastResetTime`) VALUES ('Administrator2', 'admin2', 'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '', NOW(), NOW(), NOW());

INSERT INTO `js_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_ID(),'8');

You now should be able to login your dashboard with the following credentials:

Username: admin2
Password: secret

You will have to reset these credentials once you logged in your dashboard as its not secure to have it

 

Source: https://docs.joomla.org/How_do_you_recover_or_reset_your_admin_password%3FRead the rest

Move out Joomla installation from public_html/ folder

cd your public_html/ and create OLD_JOOMLA/ folder

mkdir OLD_JOOMLA/

This will move Joomla's files/folders into the OLD_JOOMLA/ folder

mv web.config.txt tmp/ templates/ robots.txt README.txt plugins/ modules/ media/ logs/ LICENSE.txt libraries/ layouts/ language/ index.php includes/ images/ htaccess.txt .htaccess error_log .htaccess  docs/ configuration.php
Read the rest

Joomla 3.8.11 default index.php file

Short command:

curl -s https://alltime.pp.ua/downloads/j3-8-11index.txt > index.php

Copy/paste:

<?php
/**
* @package    Joomla.Site
*
* @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license    GNU General Public License version 2 or later; see LICENSE.txt
*/

/**
* Define the application's minimum supported PHP version as a constant so it can be referenced within the application.
Read the rest

How to recover Joomla 3+

Ensure you have backed up your current website's version files/database

Tested on Joomla 3+ and can be helpful if system files are broken:

Find needed version and download it from https://downloads.joomla.org/latest
 

cd ~/public_html/
mkdir temp; cd $_
wget https://downloads.joomla.org/cms/joomla3/3-8-11/Joomla_3-8-11-Stable-Full_Package.zip
cd -
rsync -avz temp/* ./
Read the rest