Skip to main content

SiteOrigin / PageBuilder and Wordpress: Copy Pages

I recently found myself in need of being able to copy a PageBuilder Wordpress page to another site in my Wordpress site network (happens in multilanguage networks...). Normally I would simply expect to switch to "code view", copy code, create new page in other site, paste code. Unfortunately, PageBuilder does not provide a "code view". Here's how I still managed to not have to recreate the layout in the new site myself:

Prerequisites: You need SQL access (PHPmyAdmin or whatever floats your boat)
Note: I am still working on Wordpress 4.7.12, not tested on any more recent versions. 

1) Save and close original page.
2) Switch to destination network site
3) Create page (name it), leave it empty, close it.
4) Open your mySQL administration console.
5) Find table wp_posts (prefix might be different depending on your setup)
6) Browse to your original post entry. There might be several versions if you use versioning, go to the most recent one (duh). Open / edit entry.
7) Copy contents (contents of post_content).
8) Find your wp_post table for the destination site (probably different prefix if in same database).
9) Find the page you created as destination page in step 3.
10) If there are multiple versions, delete all revisions.
11) Open / edit, paste what you copied into post_content. Make note of post id. Save.

12) Go to wp_postmeta (of destination site). Browse to entries related to post id. Check if there is a "_edit_lock" entry on your post. Delete that. (I simply deleted all entries belonging to that ID, after all there is not much to loose if you just created the post).
13) Go back to Wordpress. Open destination page.
14) Switch to PageBuilder view, it will ask you if you want to copy the contents to PageBuilder. Accept that.
15) et voilĂ , that should have worked.


Comments

Popular posts from this blog

Joomla! 2.5: Multiple views, one model

Here goes MVC again: I was a bit confused that every time I created a second or third view for a component, I had to create a separate model for it. Did not make sense to me - I had the necessary algorithms in the model for the first view, did I really need to do copy & paste? I hate it! Redundancy, redundancy, redundancy. That case occurred in my current project - I created user profiles and needed an "edit" view. The data is the same, but I need to have the data in editable text fields instead of fixed labels, and maybe some other buttons here and there...  Well, some time later I realized that I just did not quite understand what Joomla! acutally means by "view".  And that there is something called "layout". Long story short: If you have a model that provides all necessary information and you just want to have a different presentation of it, just add a new .php file to your views/<yourviewname>/tmpl folder - let's call it "layo...

Joomla / Eclipse: Use Eclipse to edit files

Even though I could use any Editor or Notepad, after some days of Joomla! I was yearning for some syntax highlighting and maybe even automatic code completion... I did some Java programming in the past, and I am really used to the Eclipse IDE. Eclipse IDE for JavaScript Web Developers seemed to be a good deal for what I was up to do, so I gave it a try. I feel kind of stupid even posting about this, but upon starting up Eclipse, I started to wonder how I would do that - being that Eclipse works with projects, and I didn't want to put all of my components into an Eclipse workspace, and I didn't want to put up a subversioning system. Turns out it is quite simple: Right-click somewhere in the package explorer,  select 'New', 'Project...'. In the dialog, open the folder 'General' and select 'Project'. Click 'Next'. For the name, I usually put the com_componentname / mod_modulename, as in my file system. But I don't think it matters....

Joomla! 2.5: Component as Article

Can you put a component on a page together with other articles? Like, for example, to have a component and a blog layout on the "Home" page? Yes, you can! There are some nice extensions that allow for this. I used the "Plugin Include Component" plugin, which is available on extensions.joomla.org . With this plugin, you simply create an article that contains a special tag, indicating the component to include. Just like this: Install the plugin and put the following code in whatever article you need it in (substitute 'componentName' and 'viewname' for your component's and view's name...). {component url='index.php?option=com_ componentName &view= viewname '}