Langsung ke konten utama

Terminal Command For Move, Delete, Zip and Unzip, Download on VPS

Terminal Command For Move, Delete, Zip and Unzip, Download on VPS

terlebih dahulu instal unzip pada vps:

yum install zip

lalu Anda sudah bisa zip file dengan perintah:


zip -r wp-content.zip wp-content
(jika Anda ingin mengkompress folder wp-content

Terminal Command For Move, Delete, Zip and Unzip, Download on VPS

cara backup database mysql command:

Terlebih dahulu instal dulu mysql dengan perintah: yum install mysql 
Lalu Anda bisa backup database dengan Perintah di terminal:
$ mysqldump -u username -p databasename > backup.sql
Jika mysqldump diatas tidak bisa maka gunakan perintah dibawah ini:
 /usr/local/apps/mysql/bin/mysqldump --opt -u username -p databasename > backup.sql

Anda bisa kirim file tersebut ke server lain dengan perintah
scp wp-content1.zip IP:/home/runcloud/webapps/websitekita/
  • Log in to your server with SSH as root.
  • Navigate to the directory where there are the files to be transferred, using cd command:
cd /path/to/the/directory/
  • Type the following command (make sure you replace the IP address and the file name):
scp file.txt 10.10.10.10:/root/
In this example, 10.10.10.10 is the IP address of the destination server, and /root/ is the destination folder of file.txt.
  • You will be prompted to enter the root password of the remote server.

To copy a folder and its contents to another server, please use the following procedure:

If you need to copy a folder and its contents, you should use the -r (recursive) option with the command like this:
scp -r foldername 10.10.10.10:/root/
For more information on how to use the scp command, please consult this link:
-----------
hapus file folder wp-content dengan perintah: rm -rf wp-content
rm : delete a file
rm filename.txt : deletes filename.txt, will more than likely ask if you really want to delete it
rm -f filename.txt : deletes filename.txt, will not ask for confirmation before deleting.
rm -rf tmp/ : recursively deletes the directory tmp, and all files in it, including subdirectories. hati-hati dalam menghapus file.

Restore database dengan perintah:
$ mysql -u username -p databasename < backup.sql
jika diminta password db, maka masukkan passwordnya lalu enter


Jika terjadi masalah saat upload plugin atau theme yang berpesan seperti ini:
Connection Information To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. webuzo

maka Anda buatlah akun ftp di endpanel webuzo dengan direktori sesuai dengan lokasi domain anda.
lalu masukkan host dengan nama domain dan user name serta password.

Move a file from one location to another using SSH mv command

mv /path/to/file /new/path/to/file

Move several files into a directory with SSH mv

mv -t directory fileToMove1 fileToMove2

Renaming a file with the mv command

Moving a file in the same directory with a different name will simply rename it
mv oldFileName newFileName

Komentar

Postingan populer dari blog ini

Cara Backup Otomatis Google Sheet

Google Sheet sekarang sudah sangat populer karena layanan persis microsoft Excel dan bisa dikerjakan online, hebatnya lagi layanan ini gratis, meskipun gratis google sheet bisa menjadi sangat berguna bagi Anda yang bekerja tim online seperti toko online, akuntan, akademisi dan bahkan mahasiswa sehingga kehilangan data mungkin bisa terjadi karena salah pencet oleh salah satu tim Anda yang terhubung bersama didalam satu file spreatsheet. Untuk berjaga-jaga atas kemungkinan kehilangan data, ada baiknya kita backup file google sheet secara berkala sehingga jika terjadi kehilangan data kita bisa melihat kembali pada file yang sudah kita cadangkan. Ada 3 tahap mudah melakukan backup data file google sheet kita diantaranya adalah: 1. Persiapkan File Google Sheet yang mau di backup 2. Buka google drive lalu buat satu folder 3. Masukkan script backup di script editor pada file google sheet Berikut ini tahap demi tahap melakukan backup otomatis google sheet: 1. File Google Sheet Goo...

Cara Mudah Pindah Hosting Dari Share Hosting ke VPS Menggunakan Webuzo di Digital Ocean

Sebenarnya sudah sejak dua bulan yang lalu saya bermasalah dengan memindahkan domain dari share hosting ke VPS, banyak vps yang sudah saya coba, mulai dari digital ocean ( daftar disini dapat credit $10), vpsdime hingga HostUS, namun saya gagal pindah hosting saat itu, yang mana salah satu website saya memiliki traffic hingga ratusan yang online. Dulu saya sudah berhasil menginstall webuzo pada beberapa vps dan membeli lisensi nya $2,5 agar mudah menginstall script wordpress namun masalahnya adalah pada pindah database saya masih bingung saat menggunakan webuzo, akhirnya saya putuskan untuk membeli hosting semi dedicated di hawkhost saat itu. Tadi pagi saya mencoba kembali untuk belajar memindahkan beberapa domain ke vps karena hosting semi dedicated yang saya beli di hawkhost juga semakin nyesek... CPU selalu 80% dan loding semua blog semakin lambat.. banyak tutorial yang saya baca dan mulai menerapkan secara perlahan dan detail yang akhirnya berhasil. Untuk mengingatkan diri sen...

[Resolved] WP Super Cache Cache directory not writeable

WP Super Cache Cache directory not writeable On Webuzo, i have try many way with ton tutorial from the internet, and i get resolve this case, please follow 3 way below: 1. Modif wp-config.php as this line: /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') )     define('ABSPATH', dirname(__FILE__ . "/")); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); to: /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') )     define('ABSPATH', dirname(__FILE__)); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . '/wp-settings.php'); 2. Change file and folder permission to 0777: chmod 0777 /home/username/public_html/yourdomain.com/wp-content -R chmod 0777 /home/username/public_html/yourdomain.com/wp-includes -R (Folder and files) 3. Reload WP Super Cache Plugin, and put back wp-content folder permission to 075...