How To Move A WordPress Site Manually (No Plug-in And Phpmyadmin Required)

How To Move A WordPress Site Manually (No Plugin And Phpmyadmin Required)?

This article is assuming both old and new server are ruing same software, like Apache, MySQL, PHP, etc.

Step 1: Backup all files on the old server

 /var/www

 /etc/httpd

 /etc/php.ini

Step 2: check the exiting configures from wp-config.php

define( ‘DB_NAME’, ‘wp’ );

/** MySQL database username */

define( ‘DB_USER’, ‘wordpress’ );

/** MySQL database password */

define( ‘DB_PASSWORD’, ‘YourPassword’ );

/** MySQL hostname */

define( ‘DB_HOST’, ‘localhost’ );

/** Database Charset to use in creating database tables. */

define( ‘DB_CHARSET’, ‘utf8mb4’ );

/** The Database Collate type. Don’t change this if in doubt. */

define( ‘DB_COLLATE’, ” );

Step 3: Backup Database on the old server

[root@mail ~]# mysqldump -u wordpress -p wp > dump.sql

Enter password:

root@mail ~]#

Step 4: Create a new dbasebase on the new server

[root@www ~]# mysql -u root -p

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 19

Server version: 10.3.17-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE wp;

Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]>  CREATE USER ‘wordpress’@’localhost’ IDENTIFIED BY ‘Your-Password-Here’;

Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]>  GRANT ALL ON wp.* TO ‘wordpress’@’localhost’;

Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> exit

Bye

Step 5, restore the database on the new server

[root@www ~]# mysql -u root -p  wp < dump.sql

Enter password:

Step 6, Upload all files to the new server

/var/www

 /etc/httpd

 /etc/php.ini

Step 7, start the Apache on the new server

If your website is using https, make sure to install the SSL module for Apache. Otherwise, the httpd service will not start.

[root@www ~]# dnf install mod_ssl

[root@www ~]# systemctl start httpd.service

All done