EOF

#1773844629
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/regen.php << 'EOF'
<?php
define('WP_USE_THEMES', false);
$_SERVER['HTTP_HOST'] = 't-esthetique.ch';
$_SERVER['REQUEST_URI'] = '/';
require_once('wp-load.php');
do_action('init');
if (class_exists('\Elementor\Plugin')) {
    \Elementor\Plugin::$instance->files_manager->clear_cache();
    echo "CSS Elementor régénéré OK!";
} else {
    echo "Elementor pas chargé - plugins actifs: " . get_option('active_plugins');
}
EOF

#1773844751
clear
#1773844754
mysql -u 9087o_WP633418 -p'5MbwrPTz9k' -h 9087o.myd.infomaniak.com 9087o_WP633418 -e "SELECT option_value FROM wp_633418_options WHERE option_name='active_plugins';"
#1773844838
php /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/regen.php
#1773844945
curl -s "https://t-esthetique.ch/" > /dev/null && echo "Site OK"
#1773844954
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/uploads/elementor/css/ | head -10
#1773845000
clear
#1773845001
mysql -u 9087o_WP633418 -p'5MbwrPTz9k' -h 9087o.myd.infomaniak.com 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value = 'a:7:{i:0;s:24:\"elementor/elementor.php\";i:1;s:30:\"elementor-pro/elementor-pro.php\";i:2;s:43:\"sitepress-multilingual-cms/sitepress.php\";i:3;s:35:\"wpml-media-translation/plugin.php\";i:4;s:37:\"wpml-string-translation/plugin.php\";i:5;s:41:\"wpml-translation-management/plugin.php\";i:6;s:29:\"polylang/polylang.php\";}' WHERE option_name = 'active_plugins';"
#1773845012
curl -s "https://t-esthetique.ch/?elementor-preview=1" > /dev/null
#1773845019
curl -s "https://t-esthetique.ch/" > /dev/null
#1773846656
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/ | grep -i sitepress
#1773846721
cp -r /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_OLD/sitepress-multilingual-cms /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/
#1773846823
find /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/ -name "sitepress.php" 2>/dev/null
#1773847194
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_OLD/ | grep site
#1773848714
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/ | grep site
#1773848771
find /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/ -name "sitepress.php" 2>/dev/null
#1773848806
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/
#1773849114
cp /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_OLD/sitepress-multilingual-cms_old/sitepress.php /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/
#1773849277
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/ | grep sitepress
#1773849497
cp -r /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_OOOOLLDD_BACK/sitepress-multilingual-cms/* /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/
#1773849504
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/ | grep sitepress
#1773849602
clear
#1773849605
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/ | grep -i plugin
#1773849890
cp -r /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_0000LLLDD_BACK/sitepress-multilingual-cms/* /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/
#1773849898
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/ | grep sitepress
#1773849938
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_0000LLLDD_BACK/
#1773849992
clear
#1773849995
cp -r /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_OOOOLLLDD_BACK/sitepress-multilingual-cms/* /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/
#1773850002
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/ | grep sitepress
#1773858097
cd /tmp
#1773858103
curl -L -o sitepress.zip "https://wpml.org/download/WPML-multilingual-cms/?channel=stable&licence_key=67DVzLremK&user=isaac.aristil.tic@gmail.com"
#1773858113
ls -la sitepress.zip
#1773858181
unzip sitepress.zip
#1773858345
cat /tmp/sitepress.zip | head -20
#1773859063
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/ | grep site
#1773859125
mysql -u 9087o_WP633418 -p'5MbwrPTz9k' -h 9087o.myd.infomaniak.com 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value = 'a:8:{i:0;s:24:\"elementor/elementor.php\";i:1;s:30:\"elementor-pro/elementor-pro.php\";i:2;s:43:\"sitepress-multilingual-cms/sitepress.php\";i:3;s:35:\"wpml-media-translation/plugin.php\";i:4;s:37:\"wpml-string-translation/plugin.php\";i:5;s:41:\"wpml-translation-management/plugin.php\";i:6;s:19:\"wordfence/wordfence.php\";i:7;s:27:\"ga-google-analytics/ga-google-analytics.php\";}' WHERE option_name = 'active_plugins';"
#1773859265
mysql -u 9087o_WP633418 -p'5MbwrPTz9k' -h 9087o.myd.infomaniak.com 9087o_WP633418 -e "SELECT option_value FROM wp_633418_options WHERE option_name='active_plugins';"
#1773859306
clear
#1773859309
mysql -u 9087o_WP633418 -p'5MbwrPTz9k' -h 9087o.myd.infomaniak.com 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value = 'a:9:{i:0;s:41:\"captcha-code-authentication/wpCaptcha.php\";i:1;s:31:\"elementor-pro/elementor-pro.php\";i:2;s:23:\"elementor/elementor.php\";i:3;s:43:\"ga-google-analytics/ga-google-analytics.php\";i:4;s:29:\"search-regex/search-regex.php\";i:5;s:33:\"wpml-media-translation/plugin.php\";i:6;s:34:\"wpml-string-translation/plugin.php\";i:7;s:38:\"wpml-translation-management/plugin.php\";i:8;s:43:\"sitepress-multilingual-cms/sitepress.php\";}' WHERE option_name = 'active_plugins';"
#1773864065
clear
#1773864124
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/sitepress.php && echo "OK"
#1773864263
clear
#1773864297
ho "OK"
#1773864299
uid129997@h2web171:~$ ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/sitepress.php && ec ls: cannot access /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/sitepress.php: No such fil e or directory uid129997@h2web171:~$ ||
#1773864308
clear
#1773864311
cp -r /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins_OOOOLLLDD_BACK/sitepress-multilingual-cms/. /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/
#1773864317
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/sitepress-multilingual-cms/sitepress.php && echo "OK"
#1773881928
mysql -u 9087o_WP633418 -p'5MbwrPTz9k' -h 9087o.myd.infomaniak.com 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value = 'a:7:{i:0;s:41:\"captcha-code-authentication/wpCaptcha.php\";i:1;s:31:\"elementor-pro/elementor-pro.php\";i:2;s:23:\"elementor/elementor.php\";i:3;s:43:\"ga-google-analytics/ga-google-analytics.php\";i:4;s:34:\"wpml-string-translation/plugin.php\";i:5;s:38:\"wpml-translation-management/plugin.php\";i:6;s:43:\"sitepress-multilingual-cms/sitepress.php\";}' WHERE option_name = 'active_plugins';"
#1773961665
cd  sites
#1773961667
ls
#1773961683
cd refont.t.esthitique.ch
#1773961693
cd refont.t.esthetique
#1773961696
clear
#1773961697
ls
#1773961705
cd refonte.t.esthetique
#1773961714
cd refonte.t.esthetique.ch
#1773961715
clear
#1773961717
git init
#1773961722
git add .
#1773961959
git commit -m "initial commit"
#1773961971
git remote add origin https://gitlab.com/OBouysfi/t-esthetique-ch.git
#1773961975
git push -u origin main
#1773962020
git push -u origin master
#1788803570
grep -r "t-esthetique.ch" /home/clients/afc860318628163b88709aaadcc80889/sites/*/wp-config.php 2>/dev/null
#1788803571
ls -la /home/clients/afc860318628163b88709aaadcc80889/sites/ | grep -v "oold\|refonte\|flexstart\|booking\|wellness"
#1788803598
clear
#1788803600
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT option_value FROM wp_633418_options WHERE option_name='active_plugins';"
#1788803631
clear
#1788803787
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1788803787
rm -f lock360.php wp-l0gin.php wp-the1me.php wp-scr1pts.php wp-admin.php radio.php content.php about.php mah.php jp.php ext.php
#1788803985
find /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/uploads -name "*.php" -delete
#1788803999
rm -rf /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/uploads/cache/wpml/twig/
#1788804005
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1788804021
wget https://wordpress.org/wordpress-6.9.3.tar.gz
#1788804023
wget https://wordpress.org/wordpress-6.9.3.tar.gz
#1788804039
tar -xzf wordpress-6.9.3.tar.gz
#1788804045
rm -rf wp-includes wp-admin
#1788804050
cp -r wordpress/wp-includes .
#1788804055
cp -r wordpress/wp-admin .
#1788804060
cp wordpress/wp-login.php wordpress/wp-settings.php wordpress/wp-signup.php wordpress/xmlrpc.php wordpress/wp-mail.php wordpress/wp-trackback.php wordpress/wp-load.php wordpress/wp-links-opml.php .
#1788804065
rm -rf wordpress wordpress-6.9.3.tar.gz
#1788804156
clear
#1788804158
head -20 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-login.php
#1788804164
head -20 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php
#1788804181
clear
#1788804183
head -20 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-load.php
#1788804188
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT option_value FROM wp_633418_options WHERE option_name='template';"
#1788804204
clear
#1788804206
grep -n "u-short\|redirect\|base64\|eval" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/themes/hello-elementor/functions.php | head -20
#1788804210
head -5 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-settings.php
#1788804215
tail -10 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-settings.php
#1788804285
grep -rl "u-short\|redirect\|base64_decode\|eval" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/ --include="*.php" | head -20
#1788804326
celear
#1788804328
clear
#1788804330
grep -rl "u-short" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/ --include="*.php"
#1788804336
grep -rl "u-short" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-includes/ --include="*.php"
#1788804347
clear
#1788804361
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value='a:0:{}' WHERE option_name='active_plugins';".
#1788804562
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_options SET option_value="a:0:{}" WHERE option_name="active_plugins";'
#1789113201
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1789113207
rm -f t-esthetique-ch-master.zip
#1789113296
hostname
#1789113316
hostname -f
#1789113847
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1789113847
unzip t-esthetique-ch-master.zip
#1789113917
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1789113917
mv t-esthetique-ch-master/* .
#1789113917
mv t-esthetique-ch-master/.* . 2>/dev/null
#1789113917
rm -rf t-esthetique-ch-master t-esthetique-ch-master.zip
#1789114849
rm -rf /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/cache/
#1789114917
mv /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/wp-rocket /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/plugins/wp-rocket-disabled
#1789115136
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/upgrade.php
#1789115137
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/
#1789115190
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT option_value FROM wp_633418_options WHERE option_name='db_version';"
#1789115380
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value='58975' WHERE option_name='db_version';"
#1789115481
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value='60717' WHERE option_name='db_version';"
#1789115526
grep "db_version" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-includes/version.php
#1789115560
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value='61833' WHERE option_name='db_version';"
#1789115671
ls /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/css/
#1789115885
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT option_value FROM wp_633418_options WHERE option_name IN ('siteurl','home');"
#1789115907
grep "WP_HOME\|WP_SITEURL" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-config.php
#1789121633
head -5 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/load-styles.php
#1789121985
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1789121985
wget -q https://raw.githubusercontent.com/WordPress/WordPress/6.7.2/wp-admin/load-styles.php -O wp-admin/load-styles.php
#1789121986
wget -q https://raw.githubusercontent.com/WordPress/WordPress/6.7.2/wp-admin/load-scripts.php -O wp-admin/load-scripts.php
#1789122056
grep "wp_version " /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-includes/version.php
#1789122105
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1789122105
wget -q https://raw.githubusercontent.com/WordPress/WordPress/7.1/wp-admin/load-styles.php -O wp-admin/load-styles.php
#1789122106
wget -q https://raw.githubusercontent.com/WordPress/WordPress/7.1/wp-admin/load-scripts.php -O wp-admin/load-scripts.php
#1789122212
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/load-styles.php
#1789122410
curl -sk "https://t-esthetique.ch/wp-admin/load-styles.php?c=0&dir=ltr&load=common,forms&ver=7.1" | head -20
#1789122723
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess
#1789122863
curl -sk "https://t-esthetique.ch/wp-login.php" | head -5
#1789122922
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_options SET option_value="a:0:{}" WHERE option_name="active_plugins";'
#1789122982
curl -sk "https://t-esthetique.ch/wp-admin/load-styles.php?c=0&dir=ltr&load=common&ver=7.1" 2>&1 | head -5
#1789123013
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^wp-admin/load-styles\.php - [L]
RewriteRule ^wp-admin/load-scripts\.php - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EOF

#1789123069
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_options SET option_value="a:1:{i:0;s:19:\"sitepress-multilingual-cms/sitepress.php\";}" WHERE option_name="active_plugins";'
#1789123245
curl -sk "https://t-esthetique.ch/wp-admin/load-styles.php?c=0&dir=ltr&load=common&ver=7.1" -v 2>&1 | grep -E "< HTTP|< Location|< Content-Type"
#1789123266
clear
#1789123274
curl -sk "https://t-esthetique.ch/wp-admin/load-styles.php?c=0&dir=ltr&load=common&ver=7.1" -D - | head -20
#1789123462
ls -la /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/load-styles.php
#1789123463
php -f /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/load-styles.php 2>&1 | head -10
#1789123497
ls -la /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/.htaccess
#1789123498
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/.htaccess
#1789123532
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/.htaccess << 'EOF'
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp-admin/
RewriteRule ^load-styles\.php - [L]
RewriteRule ^load-scripts\.php - [L]
</IfModule>
EOF

#1789123567
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/index.php
#1789123788
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT option_value FROM wp_633418_options WHERE option_name='rewrite_rules';" | grep "load-styles"
#1789123891
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value='' WHERE option_name='rewrite_rules';"
#1789123942
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^wp-admin/load-styles\.php$ wp-admin/load-styles.php [L,QSA]
RewriteRule ^wp-admin/load-scripts\.php$ wp-admin/load-scripts.php [L,QSA]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EOF

#1789123963
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "DELETE FROM wp_633418_options WHERE option_name LIKE 'elementor_%css%'; DELETE FROM wp_633418_postmeta WHERE meta_key = '_elementor_css';"
#1789124009
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_options SET option_value="a:0:{}" WHERE option_name="active_plugins";'
#1789124228
php -r "
define('ABSPATH', '/home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/');
define('WPINC', 'wp-includes');
\$_GET['load'] = 'common';
\$_GET['dir'] = 'ltr';
\$_GET['c'] = '0';
\$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
include ABSPATH . 'wp-admin/load-styles.php';
" 2>&1 | head -20
#1789124289
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
# BEGIN WordPress
<Files "load-styles.php">
    SetHandler application/x-httpd-php
</Files>
<Files "load-scripts.php">
    SetHandler application/x-httpd-php
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EOF

#1789124323
grep -n "blog-header\|wp-load\|wp-config" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/load-styles.php
#1789124367
echo '<?php echo "OK PHP works"; ?>' > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/test123.php
#1789124409
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^wp-admin/.*\.php$ - [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EOF

#1789125003
curl -sk "https://t-esthetique.ch/wp-admin/test123.php" -D - | head -10
#1789125077
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php | head -5
#1789125164
grep -n "404\|redirect\|send_header\|template_redirect" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-settings.php | head -20
#1789125520
ls -la /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/test123.php
#1789125521
curl -sk "https://t-esthetique.ch/wp-admin/test123.php" --resolve "t-esthetique.ch:443:$(dig +short t-esthetique.ch | head -1)" -D - | head -5
#1789297378
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.user.ini 2>/dev/null
#1789297378
ls -la /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.user.ini
#1789297470
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.user.ini << 'EOF'
auto_prepend_file=
auto_append_file=
EOF

#1789297494
php -i 2>/dev/null | grep "auto_prepend"
#1789297517
grep -r "t-esthetique.ch" /etc/apache2/sites-enabled/ 2>/dev/null | head -5
#1789297518
find /etc/apache2 -name "*.conf" 2>/dev/null | xargs grep -l "t-esthetique" 2>/dev/null
#1789297530
find /etc -name "*.conf" 2>/dev/null | xargs grep -l "refonte.t.esthetique\|t-esthetique" 2>/dev/null
#1789297542
# Check quel dossier est la racine web du domaine t-esthetique.ch
#1789297542
ls -la /home/clients/afc860318628163b88709aaadcc80889/sites/ | grep -v "oold\|old"
#1789297757
cat /home/clients/afc860318628163b88709aaadcc80889/sites/wp-config.php | grep "DB_NAME\|table_prefix"
#1789297758
cat /home/clients/afc860318628163b88709aaadcc80889/sites/index.php | head -5
#1789297822
# Remplace index.php racine par le bon
#1789297822
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/index.php << 'EOF'
<?php
// Silence is golden.
EOF

#1789297822
# Et supprime les fichiers WP à la racine qui n'ont rien à faire là
#1789297822
rm -f /home/clients/afc860318628163b88709aaadcc80889/sites/wp-config.php
#1789297822
rm -f /home/clients/afc860318628163b88709aaadcc80889/sites/wp-settings.php
#1789297822
rm -f /home/clients/afc860318628163b88709aaadcc80889/sites/wp-blog-header.php
#1789297929
clear
#1789297931
cat /home/clients/afc860318628163b88709aaadcc80889/sites/index.php
#1789298115
Pour esthytique : DELETE FROM wp_633418_options WHERE option_name LIKE 'elementor_%css%';
#1789298115
DELETE FROM wp_633418_postmeta WHERE meta_key = '_elementor_css';
#1789298129
DELETE FROM wp_633418_postmeta WHERE meta_key = '_elementor_css';DELETE FROM wp_633418_options WHERE option_name LIKE 'elementor_%css%';
#1789298130
DELETE FROM wp_633418_postmeta WHERE meta_key = '_elementor_css';
#1789298133
DELETE FROM wp_633418_options WHERE option_name LIKE 'elementor_%css%';
#1789298133
DELETE FROM wp_633418_postmeta WHERE meta_key = '_elementor_css';
#1789298400
curl -sk "https://t-esthetique.ch/wp-admin/test123.php" -D - | head -5
#1789298476
curl -sk "https://9087oaizte.preview.infomaniak.website/wp-admin/test123.php"
#1789298748
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess
#1789298748
cat /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/.htaccess
#1789298777
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EOF

#1789298810
php -i | grep "auto_prepend\|Loaded Configuration\|Scan"
#1789298843
clear
#1789298845
cat /opt/php8.2/etc/conf.d/*.ini 2>/dev/null | grep "auto_prepend"
#1789298845
find /opt/php8.2 -name "*.ini" | xargs grep "auto_prepend" 2>/dev/null
#1789298878
grep "auto_prepend" /opt/php8.2/lib/php.ini
#1789298892
echo '<?php phpinfo(); ?>' > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/info.php
#1789299047
ls -la /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/prepend.inc.php
#1789299047
find /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/ -name "prepend*" 2>/dev/null
#1789299093
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
Options -Indexes
EOF

#1789299128
curl -sk "https://t-esthetique.ch/info.php" -D - | head -3
#1789299158
curl -sk "https://t-esthetique.ch/info.php" -D - | grep "wp-json\|WordPress"
#1789299221
curl -sk "https://t-esthetique.ch/" | grep "elementor\|stylesheet" | head -5
#1789299273
curl -sk "https://t-esthetique.ch/wp-content/themes/hello-elementor/style.min.css" -D - | head -3
#1789299283
clear
#1789299296
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "DELETE FROM wp_633418_options WHERE option_name LIKE 'elementor_%css%'; DELETE FROM wp_633418_postmeta WHERE meta_key = '_elementor_css';"
#1789299307
rm -rf /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/cache/
#1789299308
rm -rf /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/uploads/elementor/css/
#1789299353
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_options SET option_value="a:10:{i:0;s:40:\"sitepress-multilingual-cms/sitepress.php\";i:1;s:41:\"captcha-code-authentication/wpCaptcha.php\";i:2;s:31:\"elementor-pro/elementor-pro.php\";i:3;s:23:\"elementor/elementor.php\";i:4;s:43:\"ga-google-analytics/ga-google-analytics.php\";i:5;s:19:\"imagify/imagify.php\";i:6;s:33:\"instant-images/instant-images.php\";i:7;s:29:\"search-regex/search-regex.php\";i:8;s:23:\"wordfence/wordfence.php\";i:9;s:34:\"wpml-string-translation/plugin.php\";}" WHERE option_name="active_plugins";'
#1789299379
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_options SET option_value="a:9:{i:0;s:40:\"sitepress-multilingual-cms/sitepress.php\";i:1;s:41:\"captcha-code-authentication/wpCaptcha.php\";i:2;s:31:\"elementor-pro/elementor-pro.php\";i:3;s:23:\"elementor/elementor.php\";i:4;s:43:\"ga-google-analytics/ga-google-analytics.php\";i:5;s:19:\"imagify/imagify.php\";i:6;s:33:\"instant-images/instant-images.php\";i:7;s:29:\"search-regex/search-regex.php\";i:8;s:34:\"wpml-string-translation/plugin.php\";}" WHERE option_name="active_plugins";'
#1789299556
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/prepend.php << 'EOF'
<?php
// Allow wp-admin files to load directly
if (strpos($_SERVER['REQUEST_URI'], '/wp-admin/load-styles.php') !== false ||
    strpos($_SERVER['REQUEST_URI'], '/wp-admin/load-scripts.php') !== false) {
    return;
}
EOF

#1789299745
curl -sk "https://t-esthetique.ch/wp-admin/load-styles.php?c=0&dir=ltr&load=common&ver=7.1" -D - | head -3
#1789300332
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
# BEGIN WordPress
FallbackResource disabled

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EOF

#1789300441
cat >> /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-content/themes/hello-elementor/functions.php << 'EOF'

// Fix wp-admin styles loading
add_action('admin_head', function() {
    echo '<link rel="stylesheet" href="' . admin_url('css/wp-admin.min.css') . '" />';
    echo '<link rel="stylesheet" href="' . admin_url('css/common.min.css') . '" />';
    echo '<link rel="stylesheet" href="' . admin_url('css/dashboard.min.css') . '" />';
});
EOF

#1789300574
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
EOF

#1789300599
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/prepend.php << 'EOF'
<?php
$uri = $_SERVER['REQUEST_URI'] ?? '';
$file = $_SERVER['SCRIPT_FILENAME'] ?? '';

if (strpos($uri, '/wp-admin/') !== false && file_exists($file) && $file !== __FILE__) {
    include $file;
    exit;
}
EOF

#1789300729
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "UPDATE wp_633418_options SET option_value='' WHERE option_name='rewrite_rules';"
#1789300841
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT user_login, user_email FROM wp_633418_users;"
#1789300848
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT user_login, meta_value FROM wp_633418_usermeta WHERE meta_key='wp_633418_capabilities';"
#1789300875
claear
#1789300876
clear
#1789300880
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT user_id, meta_value FROM wp_633418_usermeta WHERE meta_key='wp_633418_capabilities';"
#1789300939
clear
#1789300991
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_users SET user_pass=MD5("Admin123x") WHERE user_login="newadmin";'
#1789301070
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT ID FROM wp_633418_users WHERE user_login='newadmin';"
#1789301084
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_usermeta SET meta_value="a:1:{s:13:\"administrator\";b:1;}" WHERE user_id=7 AND meta_key="wp_633418_capabilities";'
#1789301103
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e "SELECT meta_key, meta_value FROM wp_633418_usermeta WHERE user_id=7;"
#1789301181
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_users SET user_pass=MD5("admin123") WHERE user_login="newadmin";'
#1789301264
mysql -h 9087o.myd.infomaniak.com -u 9087o_WP633418 -p'5MbwrPTz9k' 9087o_WP633418 -e 'UPDATE wp_633418_users SET user_pass=MD5("Admin123x") WHERE user_login="jq";'
#1789301336
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/.htaccess << 'EOF'
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp-admin/
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^(.+)$ index.php?file=$1 [L,QSA]
</IfModule>
EOF

#1789301342
head -3 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php
#1789301420
clear
#1789301421
# Supprime tout sauf wp-content
#1789301421
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1789301421
find . -maxdepth 1 -not -name 'wp-content' -not -name '.' -delete
#1789301421
rm -f .htaccess prepend.php info.php test123.php
#1789301432
scp C:\Users\OthmaneBOUYSFI\Downloads\t-esthetique-ch-master.zip 9087o_othman@h2web171.infomaniak.ch:/home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/
#1789301741
cd /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch
#1789301741
unzip t-esthetique-ch-master.zip
#1789301756
mv t-esthetique-ch-master/* .
#1789301756
mv t-esthetique-ch-master/.* . 2>/dev/null
#1789301756
rm -rf t-esthetique-ch-master t-esthetique-ch-master.zip
#1789301992
grep -n "DB_\|WP_HOME\|WP_SITEURL\|table_prefix" /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-config.php
#1789302212
curl -sk "https://t-esthetique.ch/wp-admin/plugins.php" -D - | head -5
#1789302272
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php << 'EOF'
<?php
// Route wp-admin requests
$file = isset($_GET['file']) ? $_GET['file'] : 'index-admin.php';
$path = __DIR__ . '/' . basename($file);
if ($file !== 'index-admin.php' && file_exists($path)) {
    require $path;
    exit;
}
require __DIR__ . '/index-admin.php';
EOF

#1789302272
# Renomme le vrai index.php
#1789302274
mv /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index-admin.php
#1789302317
cp /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index-admin.php /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php
#1789302400
head -5 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php
#1789302452
clear
#1789302454
wget -q "https://raw.githubusercontent.com/WordPress/WordPress/7.1-branch/wp-admin/index.php" -O /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php
#1789302464
head -5 /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php
#1789302603
clear
#1789302605
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php << 'EOF'
<?php
$requested = isset($_SERVER['REQUEST_URI']) ? parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) : '';
$wpadmin_dir = __DIR__;
$file = $wpadmin_dir . str_replace('/wp-admin', '', $requested);

if ($file !== __FILE__ && file_exists($file) && is_file($file) && strpos($file, $wpadmin_dir) === 0) {
    require_once $file;
    exit;
}

/**
 * Dashboard Administration Screen
 * @package WordPress
 */
/** Load WordPress Bootstrap */
require_once __DIR__ . '/admin.php';
wp_dashboard_setup();
wp_enqueue_script('dashboard');
if (current_user_can('install_plugins')) {
    wp_enqueue_script('plugin-install');
}
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap">
<?php wp_dashboard(); ?>
</div>
<?php require_once ABSPATH . 'wp-admin/admin-footer.php';
EOF

#1789303879
wget -q "https://raw.githubusercontent.com/WordPress/WordPress/7.1-branch/wp-admin/index.php" -O /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/wp-admin/index.php
#1789303952
cat /home/clients/afc860318628163b88709aaadcc80889/sites/lascala-restaurant.ch/.htaccess
#1789303994
cat > /home/clients/afc860318628163b88709aaadcc80889/sites/refonte.t.esthetique.ch/.htaccess << 'EOF'
<FilesMatch '\.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'>
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch '^(index\.php|wp-blog-header\.php|wp-login\.php|wp-settings\.php|wp-load\.php|wp-mail\.php|wp-activate\.php|wp-comments-post\.php|wp-cron\.php|wp-trackback\.php|wp-signup\.php|xmlrpc\.php|admin\.php|admin-ajax\.php|admin-footer\.php|admin-header\.php|admin-post\.php|async-upload\.php|customize\.php|edit\.php|edit-comments\.php|edit-tags\.php|export\.php|import\.php|link\.php|load-scripts\.php|load-styles\.php|media\.php|media-new\.php|media-upload\.php|menu\.php|menu-header\.php|moderation\.php|ms-admin\.php|ms-delete-site\.php|ms-edit\.php|ms-options\.php|ms-sites\.php|ms-themes\.php|ms-upgrade-network\.php|ms-users\.php|nav-menus\.php|network\.php|options\.php|options-discussion\.php|options-general\.php|options-head\.php|options-media\.php|options-permalink\.php|options-privacy\.php|options-reading\.php|options-writing\.php|plugins\.php|plugin-editor\.php|post\.php|post-new\.php|press-this\.php|privacy\.php|profile\.php|revision\.php|setup-config\.php|term\.php|themes\.php|tools\.php|update\.php|upload\.php|user-edit\.php|user-new\.php|users\.php|widgets\.php|site-editor\.php|site-health\.php|site-health-info\.php)$'>
Order allow,deny
Allow from all
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
EOF

