Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize website. urgent #97

Open
davehakkens opened this issue Jun 2, 2018 · 32 comments
Open

Optimize website. urgent #97

davehakkens opened this issue Jun 2, 2018 · 32 comments

Comments

@davehakkens
Copy link
Member

davehakkens commented Jun 2, 2018

We recently moved our website to a bigger (apparently faster) server, VPS 1 here However the website is gotten very slow + people complaining they are stuck at registering. :( Not sure why. Let me know if you guys see ways to fix this @nzchicken @MaloRchrd @tx4x

Either way the website could use some optimisations and fixes.
1: Removing errors from console..
2: Updating to PHP7 (worked on)
3: Cleaning up code

Anyone feels like helping out?

@davehakkens
Copy link
Member Author

nice @tx4x!
We've already added memcad caching but didn't help that much :(
They mentioned its not really used at full potential because the site requires to use the PHPsessions for logged in users so caching doesnt work.

Not sure of we have root access to the server, i got ftp?

Thanks for the offer but prefer to make it work at this hosting, as it should be solid and good...

@davehakkens
Copy link
Member Author

davehakkens commented Jun 2, 2018

Yes latest files in this 2.3 branch (still need to merge)
We currently have a dev site running (will be deleted in 2 weeks) We can use that to play around? https://nldave-houkengdi.savviihq.com/

@davehakkens
Copy link
Member Author

well sort of.. you also need to install a few crucial plugins. bbpress, buddypress, mycred and wpulike etc. Plus set some configurations to make sure its the same... And then there was something with the pins configuration @nzchicken? In short, its not super easy to setup a local environment..

@MaloRchrd
Copy link
Collaborator

@tx4x set the website locally is actualy quite complicated. As dave mentioned you need to install the plug-ins and also activate some fuctionnality in budypress settings (tick all the boxes) this will make most off the site work a part from forum and the pin for the map. The froum is a real pain to set up i never quite figure it out the right way. There is something with the prefix of all the forum '/community/forum' but i sill went into some issues.

About the website beeing slow there is multiple ways to make it faster.
So i live in the Philippines where internet isn't always performing well. For me one of the crutial part would be to stop using images for all the buttons/hover etc... this increase considerably the weight of each page. But this process could take quite a bit of time and would probably change a bit the identity of the website.

I don't know much about memcad myself i always use wp super cache but i'm not sure about the compatibility with buddypreas and bbpress

Also about the login stuff if they are stucked its probably cause there is errors could you check the root of the website if there is an .errorlog file wich could give us a start to look at the issue.

I m in holliday at the moment for 3weeks without my laptop so i won't be able to help much right now. I will follow up on the topic and see what i can do when i get back.

@davehakkens
Copy link
Member Author

So did a bit more research in this area..
Currently some plugins in the site use PHPSessions. By doing so Varnish caching doesn't work on the server (this should bring a big speed difference) One crucial plugin is our Wp-give for donations. However it unnecessary to load this script on every page, only needs to load on the donation page.

Was looking into a way to not load the script on every page but only on the once where its needed. In this case the donation page. Got me thinking whether it makes sense to exclude some heavy plugins on certain pages in general. This article show a way how to do this. Example for the contact form plugin add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 ); function my_deregister_javascript() { if ( !is_page('Contact') ) { wp_deregister_script( 'contact-form-7' ); } }

@b-n
Copy link
Collaborator

b-n commented Jun 6, 2018

Just a bit of knowledge to share about trying to run locally.
Disclaimer: devops is not really my thing, and my knowledge of linux was from 3-4 years of home/work use as a development platform. I knew enough to fix most ubuntu ish problems, but this was my first foray into using docker, so anyone with more knowledge on that is much appreciated.

I managed to at one point get this theme running locally, but the dependency on the plugins was a real pain. The current docker setup in the repo was almost working, however a couple of plugins changed which made it a bit harder to fix.

The reason for not using the default wordpress docker image is due to a dependency on the mycred plugin to have the package libmcrypt-dev installed for (i think) ssl support. There was a reason but i'm trying to think about a year now. IMO it might be worthwhile trying to use the default wordpress docker image again. I was working on a script to install the site and plugins by calling the wp-cli docker image to do the default install, but got stuck on some more permission/docker problems which is just stuff i haven't worked on in a couple of years now.

I might have another crack at it, as that would make contributing a whole bunch easier. The nature of this project is that anyone should be able to contribute, and thus making a low barrier of entry is important to helping people add more back 😄

@MaloRchrd
Copy link
Collaborator

Hello @tx4x @davehakkens, I got some spare time in the coming weeks any update about this topic ?

@davehakkens
Copy link
Member Author

cool!
We have a little bit of a problem in the last week again of people trying to register. doesn't seem to work for anyone..
And still need to remove errors from the console.
We did upgrade to PHP 7!

@adrienluitot
Copy link

adrienluitot commented Jul 18, 2018

Hi,
If the site is slow to load it's maybe because you get lot of script and stylesheet or whatever from other website like fonts. You can see them in the devtools of chrome, or firefox's web browser.
So I don't know if you can with WP but you could try adding fonts, stylesheet or js script directly on the host.
You can also try to replacing images by text (it consumes less datas 😝) in the nav menu for exemple.

At least I know that WP is very powerfull but it could also be slow. So you can first try to remove useless plugins or use an other way to create the website (like developping it 😋).

I'll try to take a look about why we can't register but whithout certainty of success.

Edit: I succeeded register on linux using firefox, but not on windows using chrome. So it can be caused by windows or chrome.

@davehakkens
Copy link
Member Author

Yeh that makes sense @adrienluitot. registering is still a challenge for some users, no idea whats going on there... Feel like its time for a start-from-scratch version!

@adrienluitot
Copy link

It could be a solution yes
If you do that I'd really like to help you making it @davehakkens !
And to find bug I think it will be easy with a scratch version.

(Personal question: Will you come in france soon ? 😄)

@pramitsawant
Copy link

pramitsawant commented Jun 27, 2019

I tested the website using google's speed testing tool
Screenshot_3
Screenshot_4

Few points i can conclude with:

  • Wordpress plugins are making the website slow
  • Lot of Images are loaded which is also making the website slow
  • too many requests are happening.

few sugessions:

  • use cdn for static content
  • limit the requests
  • also try load lesser images
  • remove unused css

@davehakkens
Copy link
Member Author

we are running on PHP 7
All current plugins are used and needed for the full community.
I think we already use CDN from jetpack?
How can you avoid to many request? Less dynamic content?

@pramitsawant
Copy link

pramitsawant commented Jun 28, 2019

How can you avoid to many request?

The percentage of size used ,requests made on the homepage

  • js files 47% ( total 44 requests )
  • css files 12% ( total 21 requests )
  • images 41% ( total 127 requests )

image
image

  • Instead of images for the navigation, svg or normal text can be used or use cdn links .
  • remove unwanted js cdns (im not a wordpress expert by check if you get any plugin to do this, here is one plugin i found )
  • compress images to smaller sizes.(i think most of the images are)

Less dynamic content?

image
These images are being retrieved from the current server where wordpress is hosted.
This section loads images of every member of community. maybe only the name of the member can be shown. its difficult to handle this and have a different cdn for media as well since this content not static content.

@davehakkens
Copy link
Member Author

We are currently running the VPS One L from here: https://www.savvii.com/pricing/?noredirect=en_US
Should be good specs no?
Yeh the theme could definitely use improvements and I want to update plugins, however if I upload Buddypress the community site crashes...
Basically the whole website needs work.. But most of our focus is currently now towards developing a new platform. But it would be good to do a few small tweaks to make this current community proper to use until we switch..

@dalecreativ
Copy link

@davehakkens is the new project based on opensource, or is it locked behind webflow?

@davehakkens
Copy link
Member Author

davehakkens commented Jun 30, 2019

@catx23

step 3. takes a few or more hours; if you don't plan to add update plugins on this page; that should improve a lot. all it takes is make all-in-one bundles and override the wp_enqueue functions; hard code or as custom plugin. i can upload this ready-to-go next week.

Not sure what you mean with this?

there are nor specs on this link; VPS means shared CPU, disc; this has been always a bad choice for high traffic pages; however, switching to a real server should give you around 30-60% initial load improvements; that's also the observation i had when i rebuilt this page here on my machine.

For some reason I think the hosting is not the issue, the company we host is quite pricey and uses proper technology. I'm up for switching but it's always quite a bit of hassle. We could gain a bit here, but I think its more the setup/theme/plugins that make everything slow.

@dalecreativ

is the new project based on opensource, or is it locked behind webflow?

Open source, here on Github. https://github.com/OneArmyWorld/onearmy
Only our static non interactive pages are made on webflow

@dalecreativ
Copy link

@davehakkens thanks 👍

With the new platform being built, will the wordpress site be needed in the future? Is it worth moving contributors efforts towards the new platform build and replacing the existing wordpress site?

Happy to put some time in here.

@davehakkens
Copy link
Member Author

@dalecreativ
We are building our new platform, however its quite a big task and in the beginning some key features will be missing. First release will be in October, however not the complete version. We keep on developing, in the meantime we keep the current forums running, until at some point we replaced all functionalities. This could take a while so good to keep the current community on Wordpress quick and bug free enough :)
Alpha version of the new platform: http://alpha.onearmy.world/

@catx23
Not sure how to proceed here, make a pull request on github and i'll replace the theme code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@b-n @dalecreativ @davehakkens @MaloRchrd @pramitsawant @adrienluitot and others