As I discovered that my web server has been getting too many xmlrpc.php requests. It is about time that I need to take action to tighten the security of my site. Most of the leading hosting providers recommend to disable call to xmlrpc.php file.
I have decided to:
- transfer my site https://broadoakdata.uk to SiteGround
- migrate my server contents to a Drupal site
In this article, I will share the migration work. I have used Drupal in the past and managed to install it without any issues.
Migration Plan
Here is the plan of work:
- identify the contents need to be migrated
- export all contents from the current site (source)
- install and configure Drupal (target)
- prepare target site by installing and enabling following modules
- ctools
- migrate
- migrate plus
- wordpress migrate
- field mapping
- create a spreadsheet, listing out all the fields from the source
- manually map out the fields
- create content type (target)
- create Categories taxonomy
- data manipulation
- check exported file and change site URL accordingly
- hard code internal links
- file migrations – /wp-contents -> /site/default/files
- execute migration
- test
Final thoughts
Migration was completed as expected. I have chosen default look and feel for Drupal site. I could have used article content type for WordPress post type instead of creating a new content type.
Following modules were installed:
- https://ftp.drupal.org/files/projects/ctools-4.0.4.tar.gz
- https://ftp.drupal.org/files/projects/migrate_plus-6.0.1.tar.gz
- https://ftp.drupal.org/files/projects/wordpress_migrate-8.x-3.0-alpha6.tar.gz
- https://ftp.drupal.org/files/projects/migrate_tools-6.0.2.tar.gz
Taking precautions against denial of service attack
- Update .htaccess file at root folder with the following directives:
<Files "xmlrpc.php">
Require all denied
</Files>
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
- Change WP admin login with the plugin Rename wp-login.php .