Did i reached the limits of wordpress and woocommerce? - wordpress

I know the question sounds a little weird, but, please, read along. I have a store based on wordpress, woocommerce and wpml - currently in two languages but with plans to add another 3. The theme is quite huge with a lot of custom integration like Infusionsoft, Xero and more. About 50 plugins, 1100 product and 1700 posts. The number of posts and products will most likely double in the near future once we add another 3 languages. The overall setup is already kind of slow although we have enough server resources: 12 cores and 31 GB of ram. On top of this, I'm looking to integrate some sort of multi store and multi domain functionality. The multi store functionality will also require to be multilingual (wpml). There are two solutions to create the multi store functionality and none of them seems to be ideal and easily replicable without hacking more into woocommerce and wordpress.
1. Another install of wp, woocommerce, wpml and then using the woocommerce API to transfer the orders, stock, etc. back to the main site.
2. Wordpress multisite - from what i read is quite buggy with woocommerce and wpml.
As a developer myself, I feel this is a overkill for the wp, woocommerce and wpml. Especially if we take into consideration that Opencart or Prestashop comes with this functionality by default - without any kind of complications. But maybe, just maybe I am missing something really clever. Did anyone faced a similar setup ? What are your thoughts about developing such a complex setup in Wordpress and Woocommerce? Do you guys think it's imminent to move to another solution like Opencart, Prestashop or Magento ?
I would really appreciate your feedback about this!
Cheers

What i would do here is investigate why the website is slow first before adding hardware to the issue. Wordpress is a great base to start with but the same as all db driven websites needs optimization as the website grows.
There are many techniques for the below so ill just point to ideas and you can re-search them yourself and decide whether they suit your website.
Test here:
http://www.webpagetest.org/
To test your server code:
Use something like microtime to measure processes especially wp queries. http://php.net/manual/en/function.microtime.php
Where possible use caching (server caching) - possibly use varnish to cache product pages and serve static pages in place of dynamically created pages.
For expensive queries like post-archives use wp-transients or your own object caching.
To test browser code:
This is probably where you will see the greatest timesavings if you have 50 plugins. Unfortunately dev's love to hook js files, css files to the footer/header. This can be a significant load time. Investigate what you can remove from your templates (un-used js scripts, css files, etc) and de-queue them. For more savings see if you can isolate the css / js actually needed for the page out of the files present - combine into 1 file of each. Most of the time you will need the header/ sidebar css and some text styles but you are loading an entire themes stylesheet.
Pretty essential:
investigate your browser caching strategy.
https://developers.google.com/speed/docs/insights/LeverageBrowserCaching
Fun project:
Did you know you can load images/js/css to the cache using js? Pre-loading!
Maybe look at post-archives that require a lot of images and see if you can preload the "above the fold" content - your user will get a pretty quick browser load time and by the time they navigate below the fold the next batch of images should be cached (if you are combining with lazy load techniques)
This might save you the need to use extra servers but if you have to look at sharding rather than using a api to transfer data using php (i presume woo commerce api uses?)

Related

What is the difference between building a site on wordpress vs hand coding?

So I'm a beginner to coding and I am wondering what is the difference between building a site using wordpress (which I am not familiar with) as opposed to just hand coding from a text editor like sublime and then hosting it. Should I be using Wordpress? What exactly are the benefits? Thank you.
It all depends on what you want the website for.
I've both hand coded and used Wordpress (and before that Moveable Type) over the past 15 years. When I was doing infrequent updates to my website then hand coding was perfect. I could make it look exactly as I wanted, it had only the elements that I needed and nothing heavy in the backend to slow it all down.
When that all changed to being frequently updated Wordpress was much easier. The ability to schedule posts was one of the big things that got me into using it. If you're doing frequent updates, which, say need to post at the same time every day or multiple times in a week, but you're not necessarily available, then it's great. If you're short on time, then it's also useful because you choose once how you want the site to look then type your information and publish it. You don't need to amend any code or use FTP.
What you do lack is the personalisation. Unless you're also going to learn how to make Wordpress themes to properly personalise a Wordpress site, then you're stuck with the templates available for download. Some are great, some are mediocre and some are very simple.
My next project is to get my sports team online properly, and because there are about five or so people who would need to edit it Wordpress works for this. I can give people limited access to allow them to post/edit posts but know that because they're restricted, they're not going to break it all, unlike if I allowed them FTP access, which could be a massive disaster with people who aren't familiar with that.
You need to consider what you're really trying to achieve. If the website is really you and needs to reflect you and you don't update it relentlessly, then hand coding would be my first choice. If other (perhaps inexperienced) people are involved or you need to do things quickly, then I'd choose Wordpress.
If you want to create your first website, you should use a CMS like WordPress, because it will be easiest for you to publish content online and you will find many free plugins and themes at the wordpress website.
The main difference between a CMS like WordPress and a hand coded website is the first is not create for you. WordPress can be used in many way, but you will have to learn the WordPress codex to create your own themes and plugins.
With the hand coded, you will create a website optimized for what you need.
But you have to consider, you will have to code again each time you want to edit something, and for some features it will be a lot of work.
WordPress already include many "must have" features like seo friendly URLs, categories and tags etc..
But you can also look for another CMS, smaller than Wordpress

Custom code in Wordpress: what are the programming limitations?

I have a website (www.easterisland.travel) that I'm considering converting into a Wordpress site. Why? Basically for the following reasons:
1: To use a CMS, so that I can teach others to further add content to the website without having programming knowledge. I would built the advanced pages myself though, and the pages that others would manage would be simple information pages.
2: Access to all of these great plugins, for example the "similar pages" plugin at the bottom of each page (which I haven't found as a independent solution for raw webpages), which is just fantastic to keep people reading.
At my site I have lots of custom stuff like booking systems that I've created. There's an AngularJS shopping cart (www.easterisland.travel/tours/), instant online booking and payment (using PayPal's Express Checkout) etc. There's a page for cruise ship shore excursions (www.easterisland.travel/cruise-ship/) that's automatically generated from database data, and I've created a system where I can add cruise ships and shore excursions (adding correct itinerary, price, info etc). Passengers can also log in and communicate to other future fellow travelers within the same group, and get organized for meeting up on the tour day. I have many more plans to go as well, for example showing hotel info, displaying TripAdvisor data (using TripAdvisor API) etc.
The million dollar questions are:
1) Can all of this be achieved in a Wordpress site? Can I add all of these systems using this platform? What are the limitations?
2) Would it make sense to change to Wordpress?
3) What implementation should be used? I don't want my code to be removed or altered when Wordpress is automatically updated.
Thank you!
Wordpress doesn't have any limitations, you can extend its default functionality if it can't accomplish what you need with either plugins or custom code. and having a framework is always better than building from scratch in many ways.
HOWEVER, wordpress was originally design as blogging platform, and if you plan on extending its simple functionality you should take some time to understand how it works to properly integrate your custom needs or things could get ugly,
If you know how to interact with the database, you can easily do what you want, there are built-in functions you can use according to your needs for database interactions or just create your own if it doesn't fit well very much.
just a quick overview with wordpress database.
wp_posts - where sites main front-end data are stored, like posts, pages,
wp_postmeta - storage for additional data that are stored on wp_posts
wp_comments - storage for user interaction data for wp_posts like comments, I've also used these before to store user/admin messages.
wp_terms - use for dividing/categorizing wp_posts data, like categories and tags,
wp_options - use for back-end storage data and configuration.
You'd need to check out these functions as you're probably will encounter them in the future
https://codex.wordpress.org/Function_Reference/add_post_meta
https://developer.wordpress.org/reference/functions/get_post_meta/
https://codex.wordpress.org/Function_Reference/update_post_meta
https://codex.wordpress.org/Function_Reference/register_post_type
https://codex.wordpress.org/Function_Reference/register_taxonomy
https://codex.wordpress.org/Class_Reference/WP_Query
If you also need database interaction, check out https://codex.wordpress.org/Class_Reference/wpdb
and for front-end implementation, check this out https://developer.wordpress.org/themes/basics/template-hierarchy/, though I never used any other wordpress theme except Genesis Framework for these past 5 years as I never had to mess too much with HTML codes and almost everything can be customize using actions & filters. I advise you to use Theme Framework (and remember to always use CHILD THEME to be safe from Main Theme upgrade)
You might also want to check -> https://github.com/WebDevStudios/CMB2 (I prefer to use this than Advance Custom Fields plugins.)
Booking system in wordpress is a bit complex, I've successfully use gravity form as booking system with AngularJS + Ajax, but never tried a custom one from scratch and don't have a chance to use booking plugin as never encountered a cleint that wants a simple booking system.
Just to answer your question.
Yes, It can, for comparison, take a look at woocommerce plugin functionality and features, I believe thats more complex than what you need.
It would make sense to convert a site built from scratch to any CMS (wordpress is an option), the CMS is up to you, though its better to use the one that you know more for easier integration and customization.
You can use your child theme "functions.php" for extending your custom functionality, like create a folder in your theme for all your custom code and include/require it on your child theme functions.php or better create your own plugin to properly integrate them, you can divide the functionality in plugins, like plugin for booking system and plugin for payment functionality. check this out https://github.com/hlashbrooke/WordPress-Plugin-Template
I hope this would give you an idea.
Yes you can do all that. You will need someone with knowledge in wordpress themes and plugins but it is possible. The beauty of wordpress is, that you can write "bare" php code, and the small amount of functions to interact with wordpress are well documented.
Wordpress itself, is structured "simple" (compared to fancy tools like magento for example). So all it manages, are posts / pages / ... which, more or less derive from the same database object. You can add functionality to those things (for example, make posts cruise ships and other posts to shore excursions) or you can add your own database structure on top.
The theme system is bare php code, so you dont have to crawl through a thousand lines of xml codes to adjust little things.
Wordpress power derives from its simplicity of the "core wordpress" and the feature volume based on all those plugins. I believe alot of people would say, that you should go for a custom solution (based on symfony for example), or a CMS that already comes with more of your desired functions (like magento which has the checkout / paypal included), but I (as a wordpress fan) would see no problem to take wordpress.
I have never failed to find a plug-in to do what I needed! I manage three WordPress sites - although none of them is commercial. (Yacht Club, Cycling Club and Political Party EDA).
There is a plug in that allows PHP on any WordPress page, but it means that the Editors all have to write using the text (HTML) view rather than Visual tab. I found that useful for some of my pages - and I'm the only "Editor."
There's also a plug-in that allows you to code PHP in Widget. That doesn't have the above disadvantage.

Migration to WordPress - first steps

I would like to migrate a html website into WordPress. At the moment I am not too familiar with WP but I've read that it is easy to use on the CMS side. (Also as a note I only have basic programming skills in html and css)
The website I would like to migrate is quite small, mostly static pages with 2-3 pages that are consistently updated for events and news articles (looks like in-line blog updates).
For the most part I would like to keep the theme of the website and then update with plugins as the website grows (i.e to include video and interactive content).
Could someone recommend the first steps to my conversion? I am currently reading Professional WordPress but migration isn't addressed until the end of the book and I would like to get the ball rolling (I have to because of my job).
Here's a good overview video. To get into specifics would really depend on what you're migrating from, so we'd need a little more detail.
Migrating A Massive Legacy CMS To WordPress Without Losing Your Mind:
http://vimeo.com/21118033

How to Build WP Site with Hierarchical Content and Using Custom Design?

A client asked me to redesign her web site, built several years ago in WP by another developer. Although I've never worked with WP before, I'm pretty comfortable with html, css, and php, and I more or less understand how WP stores content and dynamically builds pages. But I'm wondering how to approach these challenges:
My client's site has about 75 pages. There are about 25 that are static (i.e. the content changes infrequently if at all; things like "about us" and "faqs") and there are about 50 pages that are more "blog-like", except that instead of posts, the content contains directory-type info (e.g. 12 DJs in the area) or event-related info (e.g. upcoming shows at local theaters). Both of these categories contain many sub (and sometimes sub-sub) categories (e.g. medical services > pediatric > kid allergy specialists) and the content updates fairly frequently.
I understand the difference in WP between "pages" and "posts". But I need to find out the best way to structure the static content. Should I just set up a parent/child hierarchy of pages, changing the permalinks to something that makes sense? Or is it better / easier to just build the static pages outside WP and somehow link to them from the common navigation?
As a web designer, I want to "wow" my client with a great design. While there are loads of wonderful WP themes available, I really need to create something unique. But I'm wary of breaking something, so what's the best way to take an existing theme and just tweak it enough to make it look a little different?
Finally, other than mounting a massive "copy and paste" effort when the new site is built, is there a way to transfer content from the original site to the new one?
By reading your question, it seems to me that choosing WP for this kind of website was a bad choice.
Redesigning it, though, won't be that hard if it's using page templates for pages.
And yes, there's a import/export tool in WP to tranfer content. (see administration panel)
I, really, advise you to read this great tutorial about creating WP themes.
I've a blog-like WP site myself (contains RPG development articles). Here's what I did. Nested static pages simply have parent-child hierarchy: /about/mingos - that's easy to understand and i value this kind of content organisation (personal opinion).
As for themes, there's a no-brainer tool that, while not exactly apt for real business, has the capability of letting you see how stuff will look in seconds, and can sometimes give you great ideas. It's called Artisteer and there's a demo on its site that you can have a look at. Try your design ideas with it, see how stuff will look like. I'm sure you can come up with some great ideas for a "wow" design :).
Exporting content, as Soufiane Hassou remarked, is possible from within the admin panel.
Don't rule out using categories to create your hierarchy. That way you'd get the benefit of cross categorization of DJs and venues by location to create a robust cross reference system. Pages don't get this benefit without extra work.
To make this in to a directory, though, is gonna either be heavy work on managing the pages or heavy work on creating a solution that will cross reference everything and bring the content together in a usable way on the front end.

WordPress options

Today I'm on an asking spree :P
Anyhow... Right now I am developing a free WordPress theme. The problem is that I want to make it as flexible as possible so that is why I will use some theme options to set some CSS colors, widths and so on. My question is this:
If I assume that one of this themes will be used for a heavy traffic blog, how this will affect server performance? I will have an increase of SQL queries? Or something else (wrong) ?
I do not think there will be an increase in the number of SQL queries. Unless, of course, you decided to extend the worpress functionality by making the theme somewhat data driven.
However the size of your templates/images/CSS/javascript files may have some impact on the performance of the application.
As a general rule of thumb, if you are concerned about the performance of a web based app, it is always good to keep your files as light as possible.
Anyone using WordPress for a high-traffic blog is almost certain to be using WP Super Cache, which means almost all pageviews will cause (depending on whether the super bit is being used) either 0 or 1 SQL queries, regardless of what your theme does.
Wordpress isn't renowned for being gentle on the database - although I guess there might be intentions to improve over time.
So you're not causing big problems by adding an extra query.
But keep it to one query: have all your options so that one SELECT will get them all, and call that once per page load.
Alternatively, don't store the options in the database. Have a config file that lives in your theme directory.
You shouldn't really be adding anything that does anything but provide styling to your theme, if you want to keep database loading low. (Of course, I mean other than the default data retrieval functionality found in pretty much all themes.)
The only parts of your theme that should really be doing any significant querying are:
The regular bits and bobs in the loop (for the main blog page and archive pages)
The comment retrieval (for single-view posts)
The sidebar (presuming you're going for a widget-enabled sidebar)
I'd suggest leavingextra functionality (and, therefore, extra DB queries) to plugins - a theme should focus purely on aesthetics.

Resources