Hi Everyone,

Recently, I came to develop few pages using Elementor page builder, and it’s really good experience. I had started to build the pages locally and while migrating this to live it’s very difficult. That page have few static link which refer particularly to localhost. I give a try with default WordPress exporter and importer but it messed up with elementor layout. Elementor plugin keep all the section at single meta called ‘_elementor_data’ and ‘_elementor_css’. Elementor also export css to file which will goes under /wp-conent/uploads/elementor/css/post-postID.css.

With pro version we can save as page template and can export/import the pages, but this will create issue with duplicating plugin or using same page layout on other pages. Using template on different pages means we need to either duplicate template for each new page, which is not scalable and proper workflow.

So here is simple page migration from localhost(can be any domain ) to live(another domain). This require skills on database and basic skills on using server.

  1. Prepare your live environment with every resources. Meaning, upload all the files, images, styles, scripts…. in live server.
  2. Create page at live and process with edit with elementor, save page.
  3. Go to your local database, find page id you want to copy, go to postmeta table, search for that specific id, copy content from ‘_elementor_data’ and update live database with this content. You can follow this step 3 to update ‘_elementor_data’ content to live page id.
  4. Finally just to change all the locallinks by running this below sql.
    UPDATE wp_postmeta
    set meta_value=REPLACE( meta_value, 
    WHERE meta_key='_elementor_data'

    Note: let’s say your local page is localhost/projecty, and you want migrate the content on ://domainy.com. Here “\” is SQL escape character, we are using this to escape such character on post meta. if you check data was saved escaping “/”.

  5. I suggest to run this SQL on single page before going in bulk update. Also take a database backup if required. You can use post id or meta id to run for specific page.

Hope this will adds some ease on your problem.



Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: