Home WebServer PanelDirectAdmin Di chuyển Website bằng lệnh trên DirectAdmin

Di chuyển Website bằng lệnh trên DirectAdmin

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

Move the website with the command on DirectAdmin extremely simple and quickly with AZDIGI.

I. Introduction

Continuing with the DirectAdmin series, in today’s article, AZDIGI will show you how to move websites between users quickly with just one command line. This will make it very simple to transfer websites between websites without spending time manually moving like before.

Please go to part II to refer to the steps.

II. Implementation guide

To move a website from one user to another on DirectAdmin, you can do it with the following 3 steps.

Step 1: SSH into your DirectAdmin system

To move a website from one user to another on DirectAdmin, we first need to SSH or access your VPS/server with root privileges. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

After SSH has been successful, we continue with step 2 to move the website.

Step 2: Check and determine the Website and User need to move

Before moving, you need to determine exactly which User the Domain to move is located in and which user the new User needs to move to avoid errors during the move.

To determine exactly, you access DirectAdmin => Admin interface => Account Manager => Show All Users.

Move a website with commands in DirectAdmin

This page will list all the websites corresponding to the User who is managing them. As shown below, the Users corresponding to their website are as follows:

  • User: admin
    • azdigi.cf
  • User: azdigi
    • azdigi.vn
  • User: demouser
    • azdigi.cf
    • azdigi.test
Move a website with commands in DirectAdmin

After you have identified the exact website and the corresponding user, you start the moving process with step 3.

Step 3: Move the website from the Old User to the New User

The command to move the website from the old user to the new user on DirectAdmin will have the following structure:

AZDIGI Tutorial
cd /usr/local/directadmin/scripts
./move_domain.sh domain.com olduser newuser
    

For example, I will proceed to move the azdigi.cf website from the old user: demouser to the new user: azdigi. So the corresponding command will be as follows:

AZDIGI Tutorial
cd /usr/local/directadmin/scripts
./move_domain.sh azdigi.cf demouser azdigi
    

Note:

  • Command 1: Move to the script directory to run the command.
  • Command 2: The command to move the website from the old user to the new user (Remember to replace your website, old and new user respectively)

After running the command, the result will be returned as shown below that you were successful.

Move a website with commands in DirectAdmin

To be more sure, go back to DirectAdmin => Admin interface => Account Manager => Show All Users to check.

Move a website with commands in DirectAdmin

As shown below, I have successfully moved the website azdigi.cf from the old user demouser to the new user azdigi.

Move a website with commands in DirectAdmin

You don’t need to reconfigure because everything will be automatic and the website will still work normally.

Note: when moving in the above way, your website will still work normally, but when you go to the MySQL Management section on the new user, you do not see the database being moved. In this case, you need to create a new database, import it again, and then configure it if you want it to be easy to manage.

III. Summary

Thus, in this article, AZDIGI has shown you how to quickly and easily move a website from an old user to a new user on DirectAdmin, it will save you a lot of time in having to manipulate backup data and move the site as usual. If you find the article helpful, don’t forget to share it widely.

Wishing you success.

You can see more useful articles about DirectAdmin at the following link:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign