Established in Taiwan since 2011, News & Market is the first team in Taiwan that devotes itself to reporting issues of agriculture, food and the environment. As an innovative online platform, News & Market focuses on food safety, environmental justice as well as social equality in urban and rural communities.
First, it is a news website that provides timely reporting on various agriculture, food, and environmental topics. Second, the team promotes environmental-friendly products, taking faith in the transformative potentials of consumer mobilization in the larger context of market economy.
“We love WordPress and WooCommerce! Both of them have so many resources so that we can build a publishing platform integrated with E-commerce. However, after a few years using them, we faced a big challenge, the sites were very slow, and it took over one minute to update a post or a product. It impacted both frontend and backend, and frustrated users, editor and shop manager.
I am glad that rtCamp aboard to solve our issues. rtCamp team helped us to build a clean server and migrated our sites to new server in a painless manner. They worked very closely with us to make sure everything worked fine, and used many techniques to tweak the sites to make it load faster. Our sites are much faster now. We love rtCamp!”
Ahon Shaw, Co-Founder of News & Market
- NewsMarket is a WordPress multisite network with subdirectory setup that has around 10 subsites. The primary site is used for publishing news updates (blogposts) on various agriculture, food, and environmental topics.
- One of subsite is running a shop at https://www.newsmarket.com.tw/shop/ using WooCommerce. The shop has around 550+ products and more than 50,000 orders.
- The site was previously running on Linode server with old nginx, MYSQL and PHP versions. Site was slow and CPU usage was very high, hence causing downtime.
- Whenever a product was updated from backend, it used to take more than 1 minute and in some cases PHP used to crash.
- WordPress, WooCommerce and many plugins were not updated from long time. There were 150+ plugins in total and testing everything with latest WordPress and WooCommerce version was painful.
- Apart from that we wanted to use PHP7 so to avoid compatibility issues, it was critical to update them.
- WooCommerce store receives order around the clock. So migrating a store without downtime was critical.
How we did it?
- First we setup a new Linode server with latest version of EasyEngine and all recent software.
- We cloned entire multisite on new server.
- We prepared a test plan which validated if things that are critical are indeed working. This involved shop functionality and other features.
- We requested client to review list of plugins and managed to bring down number of plugins to < 100.
- We added NewRelic and started monitoring error log and other issues.
- We upgraded WordPress, WooCommerce and other plugins. Few things broke but as this staging site was in DEBUG mode, all errors were resolved.
Tweaking before migration
- WooCommerce shop pages were using WordPress default permalinks. We moved to pretty permalink which made them easier to cache.
- We used our Window Shopping Technique to cache product pages. https://easyengine.io/tutorials/wordpress/woocommerce-window-shopping-caching-technique/
- We tested shop and found it working as expected. We ensured that there was no cookie or session collision.
Migration & Going Live
- We re-imported content and database from old server to new server.
- We made old server as reverse proxy for new server. Our complete technique is documented here. https://easyengine.io/tutorials/wordpress/migration-with-zero-downtime/
Tweaking after going live
- Added AWS Cloudfront for CDN.
- Optimized MySQL queries, added index to DB tables. We used NewRelic data - https://easyengine.io/tutorials/monitoring/newrelic/ and mysqltuner results.
- We also switched to native linux cron - https://easyengine.io/tutorials/wordpress/wp-cron-crontab/ as there was a crons cript running every 5 minutes dealing with external ERP system over API -
- We also tweaked nginx-helper - https://wordpress.org/plugins/nginx-helper/ settings so that some important pages will be automatically purged whenever content (post, pages, products) are updated.
- After working on server more than 60 hours, we came up with the better result. The site is working fine without any downtime. CPU load is normal (less than 3.00 average).
- WordPress backend now loads a lot faster than previously.