Get path
set batch_path=%~dp0
cd into it, remove last character
cd %batch_path:~0,-1%
change drive from a batch file that has been elevated
%~d0%
Posted on January 28, 2023, 8:02 pm By xuan
Categories: tech tips Tags: cmd
net.exe session 1>NUL 2>NUL || (Echo This script requires admin elevated rights, exiting. & echo. & pause & Exit /b 1)
Step 1 – Verify that your current site is working
Step 2 – Download the files of your website
Step 3 – Export your database
Step 4 – Upload files to your new domain
Step 5 – Import your database
Step 6 – Go to wp_options
Step 7 – Update siteurl and home
Step 8 – Update connection details in wp-config
Step 9 – Check your site on your new domain
Step 10 – Fix permalinks (Optional)
Step 11 – Fix broken images (Optional)
Step 12 – Check your site again (Optional