Skip to content

Instantly share code, notes, and snippets.

@PhongGCS
Last active May 13, 2020 03:21
Show Gist options
  • Save PhongGCS/faf8471e6c6afd09ad819e066e8d229d to your computer and use it in GitHub Desktop.
Save PhongGCS/faf8471e6c6afd09ad819e066e8d229d to your computer and use it in GitHub Desktop.
Deploy Root theme to Hostinger
Deploy Bedrock on CPANEL
1. Prepare database
# Requirement
+ Got the root folder of CPANEL !important
# Change url and DB by Migrate DB Pro
Go to Migrate DB Pro at *.dokhacphong.com
At Migrate Tab => Choose Export File
//phong.dokhacphong.com =======> //domain live site
/var/www/clients/client3/web144/web/phong-com/site/web ===========> ROOT_FOLDER + '/web'
Hit botton Export
2. Prepare source file
# Zip Source
Use Terminal to SSH Server and go to the /var/www by command
cd /var/www
Zip Folder phong.dokhacphong.com by
zip -r phong.zip phong.dokhacphong.com
Move zip file to website to Download
mv phong.zip phong.dokhacphong.com/web
Download Source
paste this url to browser: phong.dokhacphong.com/phong.zip then Download
3. Upload Source To Cpanel
4. Extract Source
5. Move All file in phong.dokhacphong.com folder to root and remove phong.dokhacphong.com folder
6. Add File .htaccess to the root of website on Cpanel
RewriteEngine on
RewriteCond %{HTTP_HOST} ^phong.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.phong.com$
RewriteCond %{REQUEST_URI} !web/
RewriteRule (.*) /web/$1 [L]
7. Add File .htaccess to the ROOT_FOLDER/web
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
8. Create .env at root file and change DB_NAME, DB_ROOT, DB_PASSWORD, WP_HOME, WP_ENV = production
DB_NAME=wp
DB_USER=root
DB_PASSWORD=123123
DB_HOST=db
WP_HOME=http://dev.phong.com
WP_SITEURL=${WP_HOME}/wp
WP_ENV=development
MCLOUD_STORAGE_CACHE_CONTROL=public,max-age=2592000
MCLOUD_STORAGE_EXPIRES=10080 # 7 days
# Generate your keys here: https://roots.io/salts.html
AUTH_KEY='|i$lW4*I.^Y}I--K@_]b-,vG>wZa9Dj-lD-t^BtP#Qj%9I*^!]R~{!~s-Sh#h?f$'
SECURE_AUTH_KEY='0Rx#|g@67sxF(odzzFdrX&I+|KnOPQnH!Ea@~=mj|%1W#PBk-{.ASHfp%)_|RN[%'
LOGGED_IN_KEY='tvUf_q9x*7)<G+{,!f1Yv4a0:UI[xyk*rLFWq.UW6S;]BK -!!pZ{/A5?2A}|01c'
NONCE_KEY='#r9TOBG*a_|1.yzZ?3-!0<LH6#6h@uAgacf1|&9sZ_}aZO?~Bl3=C+ta![6_?[60'
AUTH_SALT='n$GS+3n~Vh}I5+Xg@B|`Cy{{][S3s{z<~P?Uuon=-C?@.$%KPNz(.dm?ZqJs-[_Z'
SECURE_AUTH_SALT='(x!$$I6%-C3I`m,L+-6Rqzf#(v099C $E-;?J$qCF_4g53 JN,`|W}S`yB@!D4HV'
LOGGED_IN_SALT='E1rQjI5Q#=9]~Ch_Wj_Odvo=|]X.+Ag+9#PcJA#~*q5;2De<otQgWQ$q@ybuaHZ+'
NONCE_SALT='=4;3&]|-Zv8,AA5TDm Iq}bj?+HcUV{w:p(k{; .[&jAD99`|hw|CL)Obs[Sx%Y='
9. Import DB at Cpanel
Create DB + Import DB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment