Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter irreo

    (@irreo)

    @diondesigns

    I’ve been talking with my coworker, the one that initially installed most of the plugins while building the site (before I joined the team), and while in “hardcore mode” we though on a situation where we removed all plugins that can be replaced with custom coding.

    I’ve tested the disable + removal of these plugins on the testing site, the one that took 4-5 seconds with an empty WP, and now it takes around 1-2 seconds (still “a lot”, but far more acceptable). Of course with no cache for now, I want to make sure the performance of the “default” installation is not terrible.

    Plugins affected:

    – Variation Swatches WC / Pro: We use it for linking images to the product attributes. I noticed that “Yith WC Product add-ons + extra options” allows this, so we are testing the removal of this plugin.
    – Facebook for WC: Still have to talk with the CM that uses it, but I hope we can remove it.
    – Max Mega Menu: Decided that we can add a custom HTML and get rid of this plugin and the WP menu once and for all.
    – Click to chat: Doable with custom code.
    – Coming soon page: Doable.
    – FontAwesome: Can add the script loading by ourselves.
    – Google Analytics: Add the code by ourselves.
    – Genesis 404: Custom on server.
    – Gravity forms: Get rid of the contact form and develop our own with good old school PHP with just what we need an not some plugin with 3180 features to only just use ONE of them.
    – Loco translate: Edit email templates directly instead.
    – Really simple SSL: Server redirect.
    – SVG support: Still have to check what this plugin does to “allow” SVG to be uploaded, maybe is doable without it.
    – WPS Hide Login: Same, check if doable manually, no sense on loading this plugin on every page load, even if it only takes 100ms. It’s supposed to be a “one time thing”.

    This will of course require work, and more if we finally decide to change the attributes and variations system, as it’s all custom made with own jQuery, triggering clicks and value changes on WP plugin inputs, etc… but maybe it’s worth it if we reduce the loading time.

    In any case, I’m still no happy at all about loading times… it shouldn’t take that long to load a simple page… this software is monster that eats server resources and requires tons of optimizations, caching, etc. to work…

    This is the testing site of the clean WP install now with duplicated products with variations and several addons to choose:

    https://dev2.deskontaliahome.com/sample-page/

    Even if it still takes time, is not as much as before.

    Thanks!
    Regards.

    Thread Starter irreo

    (@irreo)

    @diondesigns

    Hi,

    I checked the values you mentioned, but doesn’t seem to help either…

    These are the values I put on the “Additional directives” option in Plesk:

    opcache.memory_consumption=512
    opcache.max_accelerated_files=10000
    opcache.validate_timestamps=1
    opcache.revalidate_freq=60
    opcache.interned_strings_buffer=12

    I have a meeting tomorrow to evaluate possible actions, but currently I’m not sure there’s much I can do except disable some plugins and develop their functionality myself, and try the approach I mentioned of loading specific plugins depending on the content being loaded by the user.

    Thanks.

    Thread Starter irreo

    (@irreo)

    @diondesigns
    Thanks for the reply.

    1- I run 7.4 with PHP-FPM. Yesterday one of the things I did was to configure it to run as a dedicated service for each site. Maybe it was some placebo effect but it looked to run just a little faster, but still a no-no.
    (I tried to enable PHP 8 on the staging site but I have to rewrite lots of code, including outdated plugins, to avoid errors, so still haven’t tested the speed with it).

    2- OPcache is also enabled both on the server, and on the domain settings.

    3- Sadly the plugins that I listed are almost mandatory on this site… the day I debugged all the plugin times one by one, I though on some that could be replaced with custom programming. For instance, the Cookie notice can easily be done with simple HTML and PHP, and the plugin takes 100-200ms to load… the “404” page and the “Coming soon” too.

    But many others would require to re-create a lot of stuff…

    Anyway, care to mention which plugins are those? My big guess is WC… but there were actually 4-5 plugins that took +500ms to load on my tests.

    Thanks again,
    Regards.

    Hi,

    If you’ve got permissions on you Plesk or control panel used for web hosting, you have to change the PHP variable “memory_limit” to your recommended value.

    From the error message you show it appears that now you have 256M assigned.

    Keep in mind that this value is not “the higher the better”, because it means how much memory is going to be reserved for each process.

    I would try setting it to 384M first, and if it doesn’t work, to 512M, but those values are too high depending on your server.

    For instance, if you have 2Gb of ram (2048M), and you set this variable to 512M, it would mean that you can only have 4 simultaneous users (512 * 4 = 2048).

    With simultaneous users I don’t mean active people browsing your site. I mean visits that request to open content at the exact same time.

    So if your site runs with a lower memory setting, keep it that way.

    Some specific pages can take higher memory so make sure to test the whole site.

    Regards.

    Thread Starter irreo

    (@irreo)

    Which is exactly why you should start with a framework, then use hooks and actions outside of the core so you can maintain it moving forward. You could also just build a plugin to contain everything.

    It’s just a website, not some complex application that’s going to grow indefinitely. I’ve never developed a plugin, and maybe I’m missing something, but spending the time learning, testing, making things work, etc. doesn’t look like it’s worth it, at least for this case.

    Also, I work inside this company and it’s our website, meaning that I don’t develop websites for customers, in which case I guess it would make sense the creation of some plugin to reuse it in other projects.

    I just created less than 10 simple HTML pages to show customer orders, allow edit profile, shipping addresses… all using both Woocommerce of WP functions. I’m not sure what’s so bad about this. For example, if some day I want to allow users to search orders by date, I just add the textboxes and send the new parameters to WC get orders function.

    Maybe it’s because I’m more of a pure PHP guy. In the 20 years I’ve been doing this I never used a framework. Well, Angular was the only one if you can call it a FW (more like a JS/HTML extension for me). So for cases like this one I always prefer to stick to developing just what I need with the files I need, and not have a 350 files and folders structure with classes here, templates there, etc.

    Thread Starter irreo

    (@irreo)

    Well, I posted in the WordPress forums because I expect this is the place where I will find people who understands what WP requires in its htaccess file to be able to process the URL structure, while also respecting the rules I need. Or maybe even better, someone that needed something like this and has a solution.

    I could ask elsewhere, but those there would need to know why WP has those entries in the htaccess, which one could be removed or have its order changed, etc.

    About why I create all this manual work. Because I’m a web developer, I’ve been assigned this WP project, they want a LOT of customizations and need a specific design and structure. I mix WP user data with my own data in separate tables which I later use also on custom checkout pages.

    Anyway, for now I fixed this creating folders for each file, and placing an index.php file inside, so now I have WP URLs and mine working both fine.

    Regards.

    • This reply was modified 4 years, 5 months ago by irreo.
Viewing 6 replies - 1 through 6 (of 6 total)