Converting WordPress to Pimcore
When it comes to a blog project, most people decide to choose WordPress. It is open-source, easy to use, easy to develop, well documented, and has a lot of community. But when it comes to corporate, they suggest you build it from scratch because of security issues of open-source software mostly.
That is a tough choice for the people who are quite familiar with WordPress. That would be complicated. Maybe some MVC (Model View Controller) frameworks such as Laravel, Django, ASP.NET Core, and related frameworks can help. But it is still complicated because you need to build the admin panel. If you are in the PHP community, Pimcore is the best option. It is an MVC framework, has an admin panel, easy to develop, and also good enough if you want to build a blog from scratch.
In WP (WordPress), the main parts of content or data are consist of Posts and Taxonomies. Pages of WP are posts with custom post type "page". Categories and Tags of WP are taxonomies. Here are some points of converting WordPress to Pimcore:
- Create models for each custom post type you need. Don't make it with the same model. So you can define fields and easily manipulate them.
- Create models for Taxonomies too. Categories and Tags. There is a description field for Categories. A post can have multiple tags and a category. You can make it to be able to have multiple categories if you want.
- Remember to create image thumbnails. Only load images on the specific sizes or devices. You can do that with the
srcset
attribute. - Slug, it is a text field of Post models. Create a function to generate a slug automatically. Based on the title. It should be unique, lowercase only, no special characters, only dash as space, and can be overwritten by the user. You can create it with Event Listeners, on the pre-update method for data objects. To route them, you can use Static Routes, based on the generated slug.
- Yoast SEO is the most famous SEO (Search Engine Optimization) in WordPress. Technically, SEO is just HTML meta tags to serve your content on the search engine and social media. In Pimcore, you almost no need any plugin, because it is easy to create itself, just create the fields that you need for the meta tags then print them.
- Another benefit is you can add tools such as Gulp or Webpack to optimize your front-end development.
- Be careful with your security. Especially about how you print content or data. XSS (Cross-site scripting) and SQL Injection. Sanitize your input and escape your output.
Converting WordPress to Pimcore is easy and simple. If you want to migrate the existing WordPress site to Pimcore, you can make your own importer for Pimcore. WP can export data to XML, CSV, or JSON. There are many ways and plugins for that. Then how it gets imported to Pimcore is up to you. It could be on CLI command, event listener on assets, and many ways. I believe that isn't difficult.