CodeGuard will now auto-detect & add your WordPress database for you if you connect via SFTP!
Setting up your Server & Generating a Key Pair
1.) Generate a Public/Private Key pair
- On Windows open up Powershell, on MacOS & Linux open up Terminal & type in the following command and hit enter.
ssh-keygen -t rsa
- You can continue hitting enter untill the process is finished.
2.) Open up both the Public & Private Keys you generated in a text editor of your choice.
3.) Log into cPanel & do a search for âSSHâ
3.) Copy & Paste your Public Key & click Import ( id_rsa.pub )
4.) Add CodeGuard IP addresses to Remote MySQL
-
While we are in cPanel you also need to add CodeGuards IP addresses to Remote MySQL so their servers can access your Database
-
54.174.115.171
-
54.174.153.212
-
54.174.91.34
-
54.236.233.28
-
54.236.233.46
Connecting to CodeGuard
1.) Log into your CodeGuard Dashboard
2.) Scroll down & Click on the âAdd FTP/SFTP Websiteâ button
3.) Enter your WordPress Site URL
4.) Make sure SFTP is selected
5.) Enter your cPanel UserName & Password
6.) Copy & Paste your Private Key into CodeGuard ( id_rsa )
- by clicking the âUpload a Private key you have generatedâ link
7.) Click the âTest Websiteâ button
Capture Your Code
- IMPORTANT - In order for CG to automatically detect and add your database you will need to make sure that you select the Absolute Root Directory of your WordPress Installation which is usually âpublic_htmlâ, however, if you have more than one WP installation under public_html then select the WordPress Siteâs folder instead eg. /public_html/wpsite/âŚ
1.) Make sure that the Root Directory of your WordPress Installation is selected
2.) Click the âSelect Root Directoryâ button
3.) In the next Box you can check the same folder again
4.) Click the âBegin First Backupâ button.
Database
Your WordPress Database should automatically be picked up and added to your CG Dashboard. If it hasnât been then you did not select the correct Root Directory in the previous steps.
CAVEAT - If Public & Private Key isnât working
1.) Open cPanel > Filemanager & double check that the Public Key was placed in the correct spot by cPanel
- You should be above your public_html folder.
- If you donât see a folder named .ssh, check your cPanel settings to show hidden dotfiles. ( upper right hand corner gear icon )
- If the .ssh folder doesnât exist go ahead and create one ( DOTâ> .ssh )
- then create a file inside called authorized_keys
- Paste your Public Key inside there & save