Lệnh tải Source WordPress tự động trên Linux

4.8
(12)

Lệnh tải source WordPress tự động, tự tạo userdatabase mới.

Các bạn Copy script sau ra Notepad rồi sửa những chỗ cần thiết rồi Paste hết vào cửa sổ Console.

cd PathtoFolder/domain.com
wget http://wordpress.org/latest.tar.gz
tar xfz latest.tar.gz
mv wordpress/* ./
rmdir ./wordpress/
rm -f latest.tar.gz
mysql -u root -pPassroot
create database Databasename;
grant usage on *.* to newuser@localhost identified by ‘passnewuser’;
grant all privileges on Databasename.* to newuser@localhost;
use Databasename;
exit

Copy hết lệnh, sửa và paste vào Console.

Giải thích ý nghĩa các thành phần trong Script auto-download WordPress.

  • PathtoFolder/domain.com: Chỗ này các bạn phải tạo trước 1 folder lưu source website WordPress mới –> Sau đó thay thế vào.
  • mysql -u root -pPassroot : Đây là lệnh để đăng nhập vào mysql với root là user dùng để đăng nhập vào mysql của bạn. Passrootpassword của user đăng nhập vào mysql. Nhớ là -pPassroot thế pass vào phải đi liền với -p không khoảng trắng.
  • Databasename tên database sẽ khởi tạo.
  • newuserpassnewuser: Tên userpassword mới để WordPress kết nối.
Lệnh tải Source Wordpress tự động trên Linux 2
Lệnh Tải source WordPress, tạo database tự động trên Linux

Tất cả các lệnh trên ý nghĩa là Download Source WordPress về giải nén trong folder chỉ định, rồi tạo ra 1 database, user, pass mới trong mysql.

Bạn truy cập Domain đã trỏ về host để bắt đầu bước Install WordPress khai báo điền database, user, pass vừa tạo.

How useful was this post?

Click on a star to rate it!

Average rating 4.8 / 5. Vote count: 12

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

2 thoughts on “Lệnh tải Source WordPress tự động trên Linux

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.