skip to Main Content

I want to reduce my WordPress site ( naxontech.com ) memory usage. Whenever I upload anything on my site, the memory usage automatically touched the peak level

Currently, I am using shared hosting from hostinger

Configuration

1 core CPU
512MB RAM

I used the Newspaper theme by tagdiv on my site.

I asked the Hostinger support, how to reduce memory usage, they answered to increase the PHP memory to 256mb. i already did but it would not work out for my site. Now, the only solution is to optimize the Php script. Can anyone help me?

3

Answers


  1. Try using a plugin like Query Monitor to get an overview of what’s shown for each page load.

    This will allow you to check:

    • Database queries, including for slow, duplicate, or erroneous
      queries. Either refactoring or using transient / object caching for
      repeated database calls.
    • Resolve an PHP errors in the call stack and corresponding component.
    • Remove unnecessary enqueued scripts and stylesheets, along with their dependencies, dependents.

    Additional ideas may include, using php code sniffer which helps detect violations of pre-defined coding standards, and has a tool to automatically fix them.

    A final solutions is to have an app like new relic installed on the server to gian a better understand of the overall application performance, dependencies, and bottlenecks.

    Login or Signup to reply.
  2. There are indeed many avenues you could take. I would recommend starting with a good Observably tool, which should tie together the key information for you.

    New Relic APM is free for a single user and you could have it running:

    1. open an account
    2. add more data -> PHP
    3. turn on Browser monitoring
    4. optionally, setup some synthetic checks an alert off them
    Login or Signup to reply.
  3. Overall, you should ask your host provider to activate Zend OPcache.
    If you have access to php.ini you can probably activate it by yourself.

    This will divide by 2.1 the peak memory usage of your wordpress and drastically improve performance.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search