Migrate yoast.com’s online store from EDD to WOOCOMMERCE

In Yoast, we optimize all aspects of website performance. Our goal is to make the network better by making the website more easy to use, more easy to browse, faster and more reliable.

In September 2017, we migrated our online store from Easy Digital (EDD) to Woocommerce -this is where we sell all the tools, products and content on our sales of Yoast.com. In this article, I will explain why we do this, what we build, and what are the benefits of us and our users in the future. Woocommerce provides us with a technical foundation for the next few years.

Why change?

Yoast.com is experiencing incredible growth, which is mainly due to the two main factors -the popularity of our plug -in, and the expanding audience of our SEO blog. However, the combination of these two elements makes YOAST.com a challenging management website.

From historical, the site evolved from simple WordPress installation. Yoast founder Joost de Valk added Easy Digital (EDD) to promote sales of high -end plug -in. We also use EDD to provide updates for all advanced installations in the world.

Over the years, we have made more and more adjustments to ensure that EDD still meets our needs. For example, allowing our customers to pay with euro or dollar is a huge effort. Since we want to add other currencies in the future, we need to find different solutions.

When we study other options, we considered several needs:

Able to support multi -currency purchases.

  • Can support regular payment.
  • Build an integrated cost and maintenance of the platform.
  • Can support user accounts.
  • Create a SEO platform.
  • Considering future compatibility, because we hope to have a website that can still run within 5 to 10 years.
  • In order to achieve all the above itemsObject, we must make a plan.

Concept

In January 2017, we arranged for our architects Team meeting: Joost, Omar, JIP and myself. We discussed what our needs and how we can best meet these needs.

Our first conclusion is that we don’t want to leave WordPress. Although we now have other platform plugins, we are fans of WordPress and are very concerned about its mission. WordPress is our foundation, and it is very effective for us as CMS.

Why choose woocommerce?

Then we consider the e -commerce platform we want to use. We ask our best WordPress e -commerce solution, and the conclusion is that it is Woocommerce. However, like EDD, WooCommerce does not support a variety of currencies. So we need a solution.

I really like everything is the idea of \u200b\u200bmixing. We were inspired by the idea of \u200b\u200busing different sites for each language, and the MultilingualPress plug -in performed this idea well. So we re -mix it: In order to avoid writing a large number of custom code, we decided to use multi -site installation.

Therefore, Wooocommerce does not need to manage different currencies. On the US dollar website, Woocommerce does everything in the US dollar. On the euro website, Woocommerce uses the euro to do everything. This also makes it relatively easy to add new currency. We only need to add a new site and copy the settings. Combining with MultilingualPress, this will also enable us to support different languages \u200b\u200bin the future.

Yoast.com provides users with the choice between the US dollar and the euro through the switch.

yoast.com 美元和欧盟
Woocommerce is ultimately suitable for yoast.com. The reasons are as follows:

A good data model. A huge ecosystem.

    Built -in REST API and Webhook support.

  • The possibility of combining our plug -in with WooCommerce.

  • Woocommerce solves the field of e -commerce. We don’t want to spend too much time in the field of e -commerce. SEO is our expertise, so we must focus on SEO.

  • Woocommerce has a dynamic community that we can participate in it.

  • E -commerce: SKU, historical records and refund
  • I want to focus on the field of e -commerce. One aspect to consider here is SKU. Each product has a SKU -a unique identifier. SKU may sound like extra things. Why do I need SKU when I have ID in the database? But then you realize that each company’s financial department already has this system. SKU is not automatically increasing -you need a method of tracking products in a clear way. The name is not suitable for this. Therefore, on Yoast.com, SKU is now the same as our financial department to track the number of products.

Another requirement is to have a historical record for each purchase. WooCommerce performs this operation by default. Once the order is completed, that’s it. All data is immutable. If the customer changes its name, address, or email, the new information is only used for new orders. This may sound strange for developers, but it is actually an advantage. You don’t want your bank to change the transaction afterwards -once they are completed, they are completed. Any mutation is a new transaction. In terms of refund, it is the biggest difference in historical records. In the old settings, the refund order will disappear from our exit, which will change the monthly income. In Woocommerce, each refund has its own date and amount. So it is really completed once a month.

In woocommerce, each refund has its own date and amount. So it is really completed once a month.

Migrate yoast.com to the technical detail 123] Immigration We have a lot of historical data, which means that we must move a lot of orders.We chose a tool called Pandas, which aims to handle large data sets, which is a good choice for migrating all data sets. If we plan to move another migration, we may move in different directions -we will slowly format historical data in a few months. This will greatly reduce the amount of data to be migrated on the day of actual movement.

There is a major pain point that makes this process more complicated than what it needs. Since all data is stored in a meta -value in the database, it needs to be derived. Python has no effective and correct way to perform PHP derivatives, so we finally use PHP to discern these data.

Polymerization data

You may have noticed that we now have two sites. But we still want to have an overview of all data in a position. This is one of the reasons we build myyoast. All the orders we have received will be synchronized to myyoast. This means that myyoast knows everything.

WooCommerce has a system that synchronizes all orders: webhooks. The biggest disadvantage of webhook, in general, if the receiving system is down, webhook will not be received. When viewing the code of Webhooks, you will find the following code segment:

\”` / * * Let other plug -in intercept some message queue transmission, such as Rabbit /Zeromq */ Return to Apply_filters (\u0026#39; WooCommerce_webhook_Should_deliver \u0026#39;, $ should_deliver, $ this, $ arg);

We consider using the message queue recommended in the comments. , But we adopted a simpler way.

The Ruby On Rails community has a delay_job project. We found a PHP port suitable for our needs. Delayed homework is as implied by its name: it arranges a job that is executed later. This means never losing work. If the homework fails, it will try again four more times. After that, the operation can be used to debug the error. This provides us with a very powerful setting.

123]

We configure WOOCOMMERCE to try to send Webhook to our custom virtual URL: `http: // my- yoast-job.url`. This ensures that we can capture these requests from the code. We have a category responsible for dispatching homework. It captures Webhook requests and converts it into homework.

We have several categories of processing work, one for each basic construction block for yoast.com. Then these homework is handled by the staff in the background. This process is very fast, so customers will immediately see their products in myyoast. WordPress as an application

WebhookJobs If you have never read

The Twelve-Factor App

, I strongly recommend you to read. It puts forward a very robust framework for the development of web applications. How can this be converted to WordPress context? Better than you think.

工作类别

WordPress has some unique features to make it more difficult to set. But you can solve these problems to get strong WordPress installation. If you only do one of them, it should be dependent. Start using composers! It is here, and it is effective. RARST well outlines how to use Composer for WordPress development. Automatic update is not an option for complex web applications. So you need a different solution, and Composer does well.

Performance

We did not use the object cache at first. The result proves that this is a bad idea. If you use Woocommerce to deal with a large amount of sales, the object needs to cache. Without it, the order model needs to be completely re -instantiated on each request related to the order. This is very expensive, because the order model is required on many pages. At least, all checkout pages need to access orders.

We also created some pulling requests on Woocommerce itself, in order Improve performance. One of them is to modify the cache currency. Before modifying, only one currency is required for each section of code, All will convert all currencies. Considering that each store operates only in one currency, this is very inefficient.

One thing we cannot simply solve in Woocommerce is search for orders and subscriptions. This will cause the query to cause our entire website to collapse -the query contains many search for Post Meta, and these search takes a long time. We solve this problem by building our own search function on myyoast.

If Woocommerce uses a custom form, the meta search problem will also be solved. Fortunately, this is already on the WooCommerce technical roadmap. This problem also made us think about our own plug -ins. Can we reduce the number of meta bonds created by Yoast SEO? Therefore, we also add the creation of custom forms to our own technical roadmap.

The current list of WordPress plug -in and WoOOCOMMERCE extensions In order to fully understand where we log in, this is our current use of our website as a list of plug -in lists related to the function of store functions. Essence The full list contains 55 activity plug -ins. CMB2: Used to add more custom fields to the type of post.

CMB2 field type: It is used to add multiple posts as a meta value.

CMB2 post search field: It is used to search for a single post that wants to add a meta -value.

Google Authenticator: Add 2FA to our login.

Google Authenticator, according to user prompts: So all Yoast employees can use 2FA, but customers do not have to do so. Mailchimp for wordpress and Mailchimp for WordPress -premium: Use the order to connect to Mailchimp.

Members: The authority used to manage different roles, such as supporting engineers.

    MultilingualPress: It is used to manage different sites in multi -site.

  • Myyoast custom login: Set the style of the login screen.

  • New Relic report of wordpress: We use News to track our performance.

  • Postmark: Use emails for reliability.

  • Romance Admin color scheme: Everyone’s life needs a little pink!

  • WooCommerce: You may guess, process orders on yoast.com!

  • YOAST SEO: WOOCOMMERCE: Increase compatibility between woocommerce and yoast seo.

  • YOAST SEO Premium: Used to redirect, internal link suggestions and multiple keywords.

  • The current list of the WordPress plug -in and Woocommerce extension

  • WooCommerce -Payment based on national/region: It is used to use it to different countries/regions. Customers show different payment methods.

  • WooCommerce Adyencw: Used to add ADYEN payment gateways to WoOOCOMMERCE.

  • WooCommerce coupon link: Links used to create automatic application of specific coupons.

  • Woocommerce dynamic pricing
  • : It is used to provide discounts for batch purchases.

WooCommerce email customizer: used to set the style of email sent by Woocommerce. WooCommerce EU VAT number: Value -added tax number for collecting European customers and using VIES services to verify the number.

    Woocommerce gift product: used for gift products.

  • Woocommerce PayPal Express Checkout Gateway: Used to add PayPal payment gateway to Woocommerce and support WOOCOMMERCE subscription.

  • WooCommerce product bundle package: used to create bundle bags in our store.

  • WooCommerce subscription: The remaining time for tracking plug -in support and update.

  • Look at yoast.com, which is currently supported by Woocommerce.
  • Key points and results

  • We launched this new platform on August 29, 2017. In the next few weeks, we have greatly improved the performance of the website. We have achieved all the goals we want to achieve. Since migration, we have begun to build many other things. Our support team is now availableTo refund and transfer accounts more easily.We have migrated YOAST College to multiple sites.We have a series of exciting plans in 2018, including:

  • Add a store we sell with pounds.Because our past choices and we turned to Woocommerce, we can do it within a day without extra code.Add a sales dashboard to our sales team.
  • Add a sales dashboard to our sales team.

Add Composer support to our high -end plug -in.

Yoast.com 现在运行 WooCommerce
Woocommerce provides Yoast with the technical basis for building and improving our platform in the next ten years.Are you considering migrating your existing online stores to another platform?Have you already done this?Share your experience in the comments.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *