Wordpress Theme Optimization - wordpress

I would like to find out the sections of my WordPress theme which are slowing the websites down, is there a plugin which can give me a show me each action preformed and the speed.

I wouldnt use a plugin to find out where your site is being slowed down. I would run and SEO analysis on it (you can find them on a lot of seo companies sites - or just look it up) That will tell you if you are using irrelevant JS. If you are you can minimize it. Look for a JS minimister plugin that works well for your theme. Most plugins will be CSS and JS. Alternatively you could write a function so code doesn't execute on load.

Related

Is AMP possible with WordPress website built with Timber (Twig)

I tried different approaches( Wordpress Plugins) to make a WordPress site AMP compatible which is built on Timber(Twig). I did try "AMP by AMP Project Contributors" + "AMP for WP by Ahmed Kaludi, Mohammed Kaludi" but both of them didn't come up with the expected output.
"AMP by AMP Project Contributors" won't be picking the WP post images, Menus, etc.
"AMP for WP by Ahmed Kaludi, Mohammed Kaludi" gives lot of options like their layouts for AMP Pages but we might need to keep the look and feel in an identical way.
Does it needs to develop from scratch to make this AMP-compatible or is there other workarounds we can easily implement?
AMP Pages but we might need to keep the look and feel in an identical way
That is really hard to achieve. The complete AMP Project is based upon rules wich regulates the output in the frontend of a website to achive the boost of performance. Your complete Backend setup (Timber(Twig)) doesn't have a direct touchpoint to your problem.
I would recommend this two options:
Choose a AMP ready theme wich is close to your current one
Develop a Theme from scratch / edit the theme as a childtheme in order to achieve an identical design (both of your plugins might will help you - not together for sure)

Did i reached the limits of wordpress and woocommerce?

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?)

From website to WordPress or from WordPress to website?

I hope this is not too basic to be off-topic, but I am wondering to what extent it is possible to customize WordPress to fit an existing design. I have a design in mind and read somewhere (WordPress manuals?) that it is possible to only manage a small part of a website with WordPress and then slowly migrate the whole site to be WordPress-managed. If one would like to preserve a certain design, is this preferred to tweaking WordPress templates? That is to say, should I start from a website and slowly move into WordPress, or should I start from the WordPress template, and try to tweak it until I arrive at the design I want. Are there any examples of WordPress sites, which fall into light-weight (but image heavy) websites, which exhibit freedom from the WordPress mold? (Is this too vague?)
Generally speaking, I think it makes more sense to start with WordPress from the start if that is what you intend to use at the end. It will be much easier to transition your site into being fully WordPress-managed after you have some small piece of it in WordPress. This is because, while a lot of the design will fit easily into the HTML WordPress with only minor tweaks, WordPress theming is kind of a specific subcategory of its own, and there will be less of a barrier to moving if your start with CSS that is compatible with WordPress.
WordPress also makes it easy to override individual page nodes, so the static portions of your site can be part of WordPress in a very loose sense, and you'll have full control over the markup. It is less to start writing your markup knowing what you've already had to do to get your design to work with WordPress than to transition to WordPress later.
If you are new to WordPress theming, here are some links to get you started:
http://codex.wordpress.org/Theme_Development
http://themeshaper.com/2009/06/22/wordpress-themes-templates-tutorial/
Your approach depends on the technical capabilities of you to setup two sites that live next to each other.
In general, you'll have to modify Wordpretss theme to fit your design. I prefer something of a skeleton theme - http://themehybrid.com/themes Skeleton/Hybrid one. The thing about this approach is that you'll have to build your design from ground up and fit it into Wordpress way of doing things. Wordpress likes to output HTML with additional CSS styles and it's usually much easier to use those elements then to modify them to fit yours.
My personal choice, I'd start using WordPress right away, learn as much as I can about the CMS aspects, you have great tutorials at WP101 (dot) com then move to create or built your own templates. I'd suggest you first start with a simple template like Twenty Ten and modify it then perhaps you can use Responsive which is my favorite or many others. This 2 sites for example were built in WP
http://www.philiphousenyc.com/ and
http://www.danielhopwood.com/
Good Luck,
Mike

Adding a CMS (wordpress) to a website?

I have made a site using html, css and javascript and is only on my local machine and have not put it onto a server yet, but i was wondering if i could use a cms on this site like wordpress? The site is only 5 pages but i have done all the styling myself.
Would i just have to install wordpress to the server and add the files there maybe? Or is there a lot of changes needed to make this work?
I have very little knowledge of PHP but i am a quick learner if that counts for anything.
Thanks for help.
Simple answer: yes
More complicated answer: why?
If your site is only 5 pages, and you've custom designed and built your layout, then I'm not sure what WordPress will add for you.
That said, if you want to add a blog or the like, WP would certainly be nice to have.
If you want to go that route, you have a few options:
use WordPress for everything, using the 5 pages you made as 'pages' inside of WordPress. You'll have to modify what you built for that to some extent.
leave the 5 pages as-is but add WordPress 'next to it' and run the blog/cms content from there. It can look the same, or maybe you want it to look a bit different.
leave your 5-page site as-is, and use WordPress or another CMS product on a separate server. You can set it up as a subdomain and then either install your own, or leverage something like Posterous or Wordpress.com
The short answer to your question is:
it will take some effort, you won't be able to just drop the files and install wordpress and have everything work immediately. With some work, though, it is definitely possible.
If you've done the styling and you want to incorporate that into wordpress you'll have to go through the process of creating your own theme. http://themeshaper.com/2009/06/22/wordpress-themes-templates-tutorial/ Try this site to see what that requires. Alternatively, google "creating your own wordpress theme" or something similar.
It will require some extensive PHP work, but a lot of these tutorials have already done that heavy lifting for you. In any case, it will be worth it for your to pick up some PHP skills, enough to follow along the tutorials.
I had to do this myself and what you can do is integrate your design into an existing design. You could just create your own theme, which takes some time but it is the correct way to do it.
http://yoast.com/wordpress-theme-anatomy/
I knew 0 php and I was able to create my own theme in a few hours. Best of luck.
I'm not sure what you mean "add the files there", I assume you means that use a WordPress-based website to display your site, then you can simple create a page by WordPress and then link this page to your site.
But if you means to create a wordpress theme which based on your existing site, then you can search a tutorial and follow it to create a wordpress theme by yourself. Making a wordpress theme will needs some PHP work, but not complicate, wordpress has very detailed documations and API.
I would suggest using the Umbraco CMS for it. The advantage is that you start with an empty site, add your css, js, and create your own content types, paste in your HTML for the templates, and you're ready to go. It is a perfect CMS for few page sites to larger sites and also has a great community around it, including lots of documentation and screencasts. Templating is done with the Razor syntax, very easy to learn and lots of documentation. You'll need to have a Microsoft-based server to host it and this may be a barrier depending on your hosting scenario.

Do I have to Upgrade WordPress to "pro" if I want to edit the CSS?

I started using WordPress just a few hours ago because I need to develop a couple of blogs to a client. I understand that WordPress is the best solution if you want something fast but flexible. But, the first thing that I wanted to do was just change the font of the post and I didn't find how to do it (for all the posts, because I changed it on this one using the HTML editor). I've read something about editing the CSS, but it turns that I need to buy the Pro upgrade to be able to use the custom design.
Is this the same if I use WordPress in my server?
I need someone to guide me on this one. I need WordPress as customizable as it can be. But, I prefer not to pay! :) Unless that's the only way to do it.
If you use WordPress on your own server, you can do anything you like to it - it's open source. The "Pro" upgrade is just for WordPress blogs hosted on the commercial WordPress.com platform.
Do note that running your own installation means you're responsible for adding plugins, themes, keeping the code up-to-date, etc. That has a cost too, even if it's not money directly out of your pocket.
If you are using wordpress on your own server - you are free to do anything with it. The best way to customize your site then is using a child theme. It will contain your customization, overriding styles from previously loaded parent theme (and/or adding some scripts). You will be able to upgrade parent theme then without loosing your customization (until parent theme owners deprecate something you use, but it must not happen often). There are some plugins for simplifying working with it as well. There are also some easier customization ways, if you want just minor changes - such as Custom CSS in Jetpack plugin, which works in similar way, as far as I know.
If you're using a wordpress.com account, you have less freedom in modifying things, consider using paid custom CSS plugin maybe. Or maybe mentioned above jetpack will do.
Also, as mentioned in other answers - there are wordpress codex, wordpress.org forums, and wordpress stackexchange, they seem to be better place for such questions.
In your wordpress admin section of your site (usually www.yourdomain.com/wp-admin) on the left hand side nav bar, you will find a section called "appearance", if you expand this and click "editor" you can edit all of the files that your current theme uses. A quick warning, if you are doing this on a live server, the changes you make are live as soon as you save them!!
Hope this helps
I'm pretty sure you do not have to pay to customize CSS. Check your server installation... particularly in the folder $wordpress_install_home/wp-content/themes/default.
You should have access to all the CSS files in there.

Resources