How To Install BT VPS Control Panel And Restore WordPress Website Into It

BT(宝塔) is a VPS control panel application, it can help you to operate and maintain VPS server and website, it is developed by china company. It is similar with CPanel and ISPConfig etc. But it is very easy to use than them. It is free. This article will tell you how to install it, and how to use it to transfer a WordPress website into it.

1. Install BT VPS Control Panel In Linux.

  1. First you should get a VPS server, or you can install it on your local machine.
  2. Install a linux os on the server, the most compatible linux version is CentOS7.
  3. SSH to the linux server in a terminal. Then run install script to install it. You can get detail install script and instruction in this page. Below is ubuntu install script. Others is similar.
    wget -O && sudo bash
  4. After you run the BT install script in ssh terminal, it will show you below information at the end.
    Congratulations! Installed successfully!
    username: ui89huhj
    password: i8fdsff8
    If you cannot access the panel, 
    release the following port (8888|888|80|443|20|21) in the security group
  5. The url is just the BT control panel url. It include a unique id at the end of the url. And it tell you to open some port number in your security group( if your vps server sit inside a firewall such as amazon aws’s security group, google’s firewall ). Because BT control panel will use these port number to process user request.
  6. 8888 port number is the BT panel default web admin port number, you should change it after your first login. To change this port number and username and password, you should login to the BT control panel, then click dashboard settings ( 面板设置 ) menu item in left side, then you can change them in right panel.
    bt change bt vps control panel admin port number
  7. 888 port number is used by phpMyAdmin( a MySql management tool ). To change phpMyAdmin port number, you can follow below picture.
    bt vps panel change phpMyAdmin port number
  8. 80 port number is used by the website by default.
  9. 443 port number is used by https tls.
  10. 20 port number is used by FTP to transfer data.
  11. 21 port number is used by FTP to make connection.

2. Install Linux Software In BT Admin Web Panel.

  1. Login to the BT linux control panel with above url ( ) use username and password.
  2. If this is your first time login, it will popup a dialog to let you select one recommended application to install, i choose LNMP in left. You had better check the compile installation ( 编译安装checkbox, then click the green button ( 一键安装 ). After that the selected Nginx, MySQL, FTP Server, PHP and phpMyAdmin software will be installed in the linux server automatically. You should select the software version carefully that can support your WordPress and all the used plugins version ( You had better do not select the newest software version, because the newest version is not stable and not be used by so many websites, so I select MySQL 5.7, and PHP 7.4 and phpMyAdmin 4.7 ).
    bt linux control panel first login
  3. If you want to show the installed software in panel home page. You can click Software Shop ( 软件商店 ) menu in left panel, then it will list all the software that can be installed in right panel. Click the green installed ( 已安装 ) button in right panel top area, it will list all the software that has been installed.
    bt panel software shop panel
  4. At the end of each installed software, there is a toggle button in column 首页显示, toggle this button will decide whether display this software in home page or not.
    show installed software in home page toggle button
  5. You can also search and install other software which you need in this software shop.

3. Add Website.

  1. Click WebSite ( 网站 ) menu in left panel.
  2. Click Add WebSite ( 添加站点 ) button in right panel to add a new website.
  3. Input domain name, one domain one line ( please note and are different domain name, you should add them all to make both domain name can reach your website ). Select related PHP version. Do not create database. Then click 提交 button.
    bt panel add new web site dialog
  4. Now you can see the newly added website in the website list page.
    bt website list page-1
  5. Click the root folder ( 根目录 ) in the website line, it will open the website root folder.
  6. Download the WordPress backup file, then click 上传 button to upload the backup file to above website root folder.
    bt panel upload website wordpress backup file
  7. At the end of the WordPress backup file, click 解压 link to unzip it. You can refer article How To Restore WordPress Website From Backup to learn more about WordPress backup and how to transfer those backup files.

4. Create WebSite MySQL Database And Import Exist WordPress Database Data.

  1. After you unzip above WordPress backup file, you will find a .sql ( for example abc_xyz.sql ) file in the root folder.
  2. Open this .sql file, you will find the database name in the top text lines.
    -- Database Name: abc_xyz
  3. Open file wp-config.php in above unzip root folder. You can find the database nameusername and password in below source code.
    // ** MySQL settings ** //
    /** The name of the database for WordPress */
    define( 'DB_NAME', 'abc_xyz' );
    /** MySQL database username */
    define( 'DB_USER', 'test' );
    /** MySQL database password */
    define( 'DB_PASSWORD', '12345678' );
  4. Click the 数据库 menu in left panel. Then click 添加数据库 green button in right database list panel.
  5. Input database name, username and password in the popup dialog. Click 提交 button to create it.
    bt linux control panel add database dialog
  6. After create the MySQL database, you can find the database in the database list page.
    bt database list page-1
  7. Click the 导入 link in the 备份 column of one database line, then it will popup a dialog that let you upload your sql file. If your file is too big, you can upload the big sql file to server use FTP, you can see detail explanation in the popup dialog.
    bt import database backup from sql
  8. After import the database, you can now manage the database.

5. Manage The MySQL Database Table Data.

5.1 Get MySql Database Root User Password.

  1. Check the checkbox at the beginning of the MySql database line, then click root密码 button at database list page top area, it will popup a dialog which contains the root user password, remember the password or you can change it to your own password.
    change bt panel database root user password window
  2. Now click 管理 link at the end of the database line, then it will popup phpMyAdmin login page in a new tab. Login to phpMyAdmin with root user and password, otherwise you can not find User accounts tab in phpMyadmin. If you do not installed phpMyAdmin, it will tell you to install it first. If you find phpMyAdmin page can not be opened, you should make sure port 888 has been allowed by your vps firewall.

5.2 Create Your WordPress User Account.

  1. Click User accounts tab at the top of phpMyAdmin admin web page. If you can not see User accounts tab, click the Server:localhost link at top left corner of phpMyAdmin admin web page. If you still can not find User accouts tab, first you should make sure you login with root user account, or you can close the phpMyAdmin page, and reopen the phpMyAdmin page again, then you can find User accounts tab.
    phpMyAdmin user accounts tab
  2. You can find the WordPress used MySql database user account in the list. If you do not find it, you can click Add user account link at web page bottom left to add your user account.
  3. Edit the user account privileges, assign all privileges ( except  ) to [email protected] and [email protected].

5.3 Verify WordPress WebSite Database Data.

  1. Click your WordPress website database name in phpMyAdmin left panel.
  2. Then it will list all database tables. Click the table with _options suffix. Then you can verify below two row data value, siteurl and home.

6. Set WebSite Pseudo Static For WordPress To Avoid 404 Error When Browse WordPress Article.

Now your WordPress website has been setup and restored use BT(宝塔) linux control panel. But if you browse you post, you will get 404 error. But the website home page and admin page can be accessed. This is because you do not set the Pseudo Static for your WordPress. Below is the steps about how to set it.

  1. Click 网站 menu in left panel to go to web site list page.
  2. Click website name, then click Pseudo Static ( 伪静态 ) menu item in left panel, the select wordpress in right panel drop down list, then click save ( 保存 ) button.
    bt panel website pseudo static page settings
  3. Now you can access your website article correctly. If the article page still return 404, you can login to WordPress admin site, then click Save Changes button in Settings —> Permalinks page.

7. Enable SSL To The WordPress Website.

Now your WordPress website is ready for user to access, but it is not a secure website. To make it secure we should enable SSL to it follow below steps.

  1. Go to the website list page, click the website domain name to open website edit popup dialog.
  2. Click SSL menu in left panel. Click the Let’s Encrypt tab, check all domain checkbox, click apply ( 申请 ) button.
    bt panel enable ssl for website
  3. After apply the SSL encrypt, turn on the 强制HTTPS toggle radio button at top right. Now your WordPress website has been changed to a secure website.

8. How To Add CloudFlare To Your Website.

If you want to use CloudFlare as your website CDN. You can read article CloudFlare Plus SSL To Make Your WordPress Fast And Secure.

When you add CloudFlare in front of your website, you can not use website domain name to access it’s BT panel, because CloudFlare do not open special port number which is used by your BT panel. You can access your website BT panel use it’s original ip address with the BT panel port number.

9. How To Change BT(宝塔) Panel Port Number And phpMyAdmin Port Number.

The default BT panel port number is 8888, and the default phpMyAdmin port number is 888. For security reason, you should change it at once after you install it. Below is the steps. After you change the port number, you should make sure to add the new port number in the firewall to allow them being accessed.

9.1 Change BT(宝塔) Panel Port Number.

  1. Login to BT panel.
  2. Click Dashboard Settings ( 面板设置 ) in left side panel, then you can change the panel port number, username and password in right panel. You can see them in below picture red circle.
    change port number, username, password in bt panel admin website settings

9.2 Change phpMyAdmin Port Number.

  1. Login to BT panel.
  2. Click software shop ( 软件商店 ) in left panel.
  3. You can see phpMyAdmin in right installed software list. Click 设置 link at the end of phpMyAdmin line.
    phpMyAdmin settings
  4. Then it will popup a dialog. Click 安全设置 tab in left, then you can change 访问端口 value.
    bt panel set phpmyadmin port number
  5. You should also click the php版本 tab in left to check whether the php version is correct or not. This may cause the phpMyAdmin unreachable.
    change bt panel phpmyadmin php version

10. Why Can Not Access BT Panel And PhpMyAdmin.

  1. BT panel and phpMyAdmin port number is not added in firewall rule.
  2. Do not set phpMyAdmin php version correctly.
  3. Do not install phpMyAdmin.
0 0 vote
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x