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...

[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...

Convert Htaccess ke NginX di Webuzo menghidari Not Found 404

Convert Htaccess ke NginX di Webuzo menghidari Not Found 404 - Pertama Anda harus login  sebagai root ke ssh server anda kemudian edit conf.d dengan Standar perintah: vim /usr/local/apps/nginx/etc/conf.d/common Setelah terbuka, tambahkan beberapa baris pada bagian paling bawah : location / { try_files $uri $uri/ /index.php?q=$request_uri; } namun jika Anda mengubah dari blogspot ke wordpress yang biasanya .html?m=1 yang ada di pencarian google masih tersisa dan akan membuat not found, berbeda dengan httacces yang bisa Anda lihat turorialnya disini . Untuk Nginx anda bisa ubah di file /usr/local/apps/nginx/etc/conf.d/common location / { try_files $uri $uri/ /index.php?q=$request_uri; } menjadi: location / { try_files $uri $uri/ /index.php?q=$request_uri; if ($query_string ~ "^m=1$" ){ rewrite ^(.*)$ /$1? redirect; } } Jangan lupa selalu restart nginx setelah melakukan perubahan dengan perintah: service nginx restart Jika Anda memili...