Wordpress to Wordpress Cluster Migration

This guide is intended to help with the smooth migration of WordPress websites to Apiqcloud WordPress Cluster. Follow the simple steps to make migration flow painless and secure.

Note: This is a manual process. For plugin-based migration refer: https://apiqcloud.com/portal/knowledgebase/288/How-to-Migrate-a-WordPress-Site-to-Apiqcloud-PaaS.html

Overview:

  1. Migration
  2. Install Litespeed Cache
  3. Redis Setup
  4. Troubleshooting

 

Migration

  1. You will need to backup all existing data from your old WordPress installation. For manual migration, you will need all files under your account's root (known as 'public_html' or document root). You need to compress the files to ZIP in order to transfer to apiqcloud WordPress Cluster. You will also need your database file. You can download your database from your hosting panel. A well-known and widely database manager is PHPMyAdmin. From here you can export your database in SQL or ZIP format.

    Export window in PHPMyAdmin

  2. Once you are ready with files, Create a WordPress Cluster Kit. Check our article on how to configure WordPress Cluster Kit: https://apiqcloud.com/portal/knowledgebase/308/WordPress-Cluster-Installation-Guide.html
  3. Now you have to extract all your files in Application Node under /var/www/webroot/ROOT folder. For this, you have a couple of ways. You need to upload the zip first via FTP. Check here how you can connect via SFTP: https://apiqcloud.com/portal/knowledgebase/279/SFTP-or-SSH-Access.html

    Filezilla Transfer WIndow

    If you have access to your ZIP file via any URL you can download it to your Application Server via WebSSH.



    Once downloaded extract the files
    #Change folder to where your ZIP is stored
    cd /var/www/webroot/ROOT
    #unzip data in the current directory. Change data.zip with your file name
    unzip data.zip​


    Note: The data you extracted may not be correctly placed under /data folder to move extracted files just use the mv command to move files and folder.

  4. Now for Database upload access PHPMyAdmin. You should get login details for PHPMyAdmin via Email as soon as you install Cluster. Using those credentials log in to PHPMyAdmin. Here you can create, delete, upload a database.

    You can upload to pre-existing and currently in use database for import your database. You can also create a new database. But if you created a new database you will need to update the wp-config.php file with the new Database name.

    Edit WP config file

    You can also upload SQL via FTP and put it in a folder /var/lib/jelastic/phpMyAdmin/upload/ mentioned in the image and then import it by selecting the file option



    Also, you can import the database via command line




    #below command will import the file.sql stored into database_name
    #make sure to set username database_name and correct path to file
    #Once you press enter you will be prompted for a password
    mysql -u username -p database_name < /path/to/file.sql
    Enter Password:
    


    Note: In WordPress Cluster, Galera Cluster is used which requires all tables having PRIMARY KEY defined. So check your database once if all databases have PRIMARY KEY or not. If it doesn't have one then you can simply add PRIMARY KEY to the database via PHPMyAdmin.

  5. Make sure your wp-config.php has correct Database credentials in the wp-config.php file. As mention previously you can find credentials in your email.

  6. Now access WordPress and check if everything is working or not

Install Litespeed Cache

  1. To install the Litespeed cache (If not already installed) you need to install a plugin in WordPress
  2. Go to wp-admin > Plugins > Add new

  3. Search Litespeed Cache in the search bar

  4. Click on Install and once it is installed activate the plugin

Redis Setup

In WordPress Cluster, the Redis is configured by default. You can see it in the Variables section for more clarification.

      

 

     

 

To check Redis connectivity with the server, follow the below steps:

  1. Take SSH of web-server
  2. Run the command redis-cli
  3. Output: Could not connect to Redis at 127.0.0.1:6379: Connection refused
    not connected> 
  4. Check the status of redis by 'service redis status'
  5. If it's running then need to check the port in the redis.conf file.
  6. The default port is 0. Change it to default redis port i.e. 6379
  7. Restart the web-server
  8. Now the o/p of redis-cli will be
    127.0.0.1:6379> 

          

 

Also, need to configure Redis in wp-admin. For this, you can refer to the below steps:

  1. Login to wp-admin
  2. Go to Settings > Litespeed Cache > Object
  3. Add the Host and Port

         

Troubleshooting

  1. Access Denied:
    1. Take WebSSH access of storage node and run below command
      chown -R 700:700 /data
  2. Wrong URL:
    1. You can set Home URL and Site URL in the wp-config.php file
    2. Or you can directly change Home URL and site URL in PHPMyadmin > Your Database > wp-options
  3. Changes not reflecting:
    1. Go to WordPress > Litespeed Cache
    2. Clear All Cache (Or select appropriate action according to your needs)
 
 
 
 
 
 
  • wordpress, migration, wordpress cluster installation
  • 0 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

Multi-Region WordPress Hosting for Enterprise Availability and Performance

In this article we cover a multi-region geographic distribution approach for WordPress CMS...