Skip to content

[Workflow] Transfer codebase WP Rails and deploy to Heroku

Zayyana Khoir edited this page Dec 30, 2020 · 3 revisions

This page will explain about step by step to transfer website codebase from wordpress to rails until deployed to Heroku

Step 1: Preparation

1. Download all the resources from WP using "ResourceSaver"

ResourceSaver is an add-ons in Google Chrome

Test 123

2. Upload all assets to S3

2.1. Create new S3 bucket

2.2. Allow CORS

2.3. Upload folder wp-includes & wp-content

2.4. Create CloudFront for enabling CDN and connect it to newly created bucket

3. Create new github repository

4. Create new Rails project without database / active-record

rails new --skip-active-record

5. Move code in index.html from wp to new rails project

app/view/home/index.html.erb

6. Add config to allow the page can be accessible through rails

6.1. Create new routes

root "home#index"

6.2. Create new controller

app/controller/home_controller.rb

class HomeController < ApplicationController
  def index; end
end

7. Change all the assets host to CDN host

Clone this wiki locally