HOWTO.bluehost - raynaldmo/HOWTO GitHub Wiki
- From local machine
- Attempt to ssh into server
ssh -p 2222 user_namer@server_ip_address
[enter my.bluehost.com account password]
- If not authorized, contact Bluehost tech support to enable access - via chat
- Check that ssh works
- From local machine
- Generate SSH keys
- Login to my.bluehost.com
- Navigate to Advanced -> SSH
- Click "Manage SSH Keys"
- Click "Import Key"
- Paste in public key
- Click "Import"
- Password-less SSH access should now be enabled
- Exports / Imports site content only using XML file
- Doesn't handle
- Source files (core, theme, plugin)
- Media files
- Full database
- Exports site's database only
- Use PhpMyAdmin or mysql to import database (yuck!)
- Doesn't handle
- Source files (core, theme, plugin)
- Media files
- Exports / Imports
- Full database
- Media files
- Theme and plugin files (optional)
- Doesn't handle core files
- Exports
- Source files (core, theme, plugin)
- Full database
- Media files
- Exports backup on local machine
- Generated proprietary
.wpressfile
- Generated proprietary
- Exports
- Source files (core, theme, plugin)
- Full database
- Media files
- Content
- Exports backup on site directory on server
../wp-content/uploads/- Generate
.zipfile - Was able to import
.zipfile into Local by Flywheel and launch local site
- Generate
- Handles import
- TBD
-
Create site and Enable Coming soon
-
Configure site (add plugins, theme, content etc.)
-
Launch site
-
Site changes
- Create staging site
- Make changes
- Copy staging to live
-
Later on figure out workflow for dev - prod site
- Create bitbucket remote repo on RNJ Web Design account
- Use https and not ssh
- Create vanilla site - Enable Coming Soon feature
- Disable core , plugin, theme auto update
- From production site Dashboard, download and install BackWPup
- Generate a site backup using BackWPup
- Select Database backup, File backup, WordPress XML export, Installed plugins list for backup
- SSH into server
-
zipfile will generated as seen below
// example backup file location
[email protected] [~/public_html/wp-content/uploads/backwpup-8c6ce3-backups]# ls
./ ../ .donotbackup .htaccess 2020-04-17_22-11-28_ROGGZYZV01.zip index.php
- Use scp to copy zip file to local machine
- On local machine
~/Desktop/RNJ Web Design/rnjwebdesign/db $ scp [email protected]:/home4/mrpatchr/public_html/wp-content/uploads/backwpup-02738a-backups/2020-04-18_17-19-17_JABHHCVJ01.zip .
-
Use Local by Flywheel (LBF) to Import site
- See How to Import a WordPress Site into Local
- File -> Import Site
- Select
zipfile from above - Be sure to match PHP and MySQL versions from Bluehost server
- Assign local site
.localdomain
-
At this point local site should be a virtual copy of vanilla production site
-
Configure site (add theme, plugins, content etc.) on dev / local site
- Use BackWPup PRO to copy configuration to prod site
- Need free tool to import / export
- Test prod site
- Remove Coming Soon from prod site
- Site is live!
- Add content (pages, post media) directly on prod site
- Install and test plugin on dev site
- Only do update to current theme
- Options use git or use staging site ?
- Only use Git for custom themes and plugins ?
- Let bluehost auto update core and released themes/plugins
- TBD
- Create bitbucket remote repo on RNJ Web Design account
- Use https and not ssh
- Create vanilla site (Enable Coming Soon feature)
- Disable core , plugin, theme auto update
- Use SSH, create and push local git repo to Bitbucket remote repo
[email protected] [~/public_html]# pwd
/home4/mrpatchr/public_html
// .gitignore contents
// don't commit wp-config.php file
# cat .gitignore
.idea/
jaesinteriors/
wp-config.php
.htaccess
cgi-bin/
.well-known/
error_log
# git init
// avoid error: fatal: unable to create thread: Resource temporarily unavailable
// when pushing code to bitbucket remote repo
// See: https://stackoverflow.com/questions/9905257/git-push-fatal-unable-to-create-thread-resource-
# git config --global pack.threads "10"
# add git remote - use https and not ssh
# git remote add origin https://<user_name>@bitbucket.org/<user_name>/<repo_name>.git
# cache Bitbucket git repo credentials for one week
# git config --global credential.helper "cache --timeout=604800"
# git add .
# git ci -m "Initial commit"
# git push -u origin master
- From production site Dashboard, export content
- (WP Migrate DB Pro instead ?)
- Tools -> Export
- Save to RNJ Web Design site directory (db) on local machine
- Clone bitbucket repo
- Pull code from remote repo
- Create site using Local by Flywheel
- Import site
- Import database
- Configure site, add themes, plugins, custom code etc.
- This method does not use Git
- Uses Local by Flywheel site export/import functionality
-
On local server 1
- Export site using Local by Flywheel GUI
- This will create {site_name}.zip export file
- Export file contains, source files, media files and database
- This will create {site_name}.zip export file
- Upload file to Google Drive
- Export site using Local by Flywheel GUI
-
On local server 2
- Download export file from Google Drive
- Import file using Local by Flywheel GUI
- This method uses Git
- Use All-in-One WP Migration plugin to export db, files, content, media
- Don't like this method as it overwrites default site built by Bluehost
- Generate database dump
- Create tarball for media files
- Use SSH and git to transfer source files