We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Site slow and fast | Forum

Outperformer 3000
Outperformer 3000 Oct 22 '20

Hi mates, I hope everybody is healthy and good.

Maybe you can help me: I wondering about my oxwall site. It's loading slow, often, but not always. Something it goes very fast, but then if I want navigate to another section it takes very long, but then suddenly it load the site completely fast. So, I thought it is because of php. My host has 7.2, 7.3, 7.4 and a additional turbo function, but if I set the turbo, some features not working correctly (like ban a user). I try all three versions, but I have the problems with all three versions.


Does anyone have an idea to speed up the sites like here on this oxwall site ... Thank you! 

Chris_W
Chris_W Oct 22 '20
Is there any caching and compression enabled in your ,htaccess file? It sounds like your browser is keeping static files until you navigate to another site, then dumping them so when you come back you have to request a whole new copy of the site.


How old is the site, has it ever worked consistently?  

Outperformer 3000
Outperformer 3000 Oct 22 '20

I noticed it only recently, but maybe it's been a long time, i've only ever looked in briefly as admin. Site is 4 years old.


That's my .htaccess:


AddType application/x-httpd-php73 .php
Options +FollowSymLinks
RewriteEngine On

AddEncoding gzip .gz
AddEncoding gzip .gzip
<FilesMatch "\.(js.gz|js.gzip)$">
  ForceType text/javascript
</FilesMatch>
<FilesMatch "\.(css.gz|css.gzip)$">
  ForceType text/css
</FilesMatch>

RedirectMatch /index$ https://mysite.de
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !/ow_updates/index\.php
RewriteCond %{REQUEST_URI} !/ow_updates/
RewriteCond %{REQUEST_URI} !/ow_cron/run\.php
RewriteCond %{REQUEST_URI} !/e500\.php
RewriteCond %{REQUEST_URI} !/captcha\.php
#RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php



# disable the server signature
ServerSignature Off

# Enable compression
<IfModule mod_deflate.c>
  <FilesMatch "\.(js|css|php|eot|ttf|otf|svg)$">
    SetOutputFilter DEFLATE
  </FilesMatch>
</IfModule>

# Control ETags which is thought that bring better performance
<IfModule mod_headers.c>
    Header unset ETag
</IfModule>
FileETag None

<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary Accept-Encoding
  </FilesMatch>
</IfModule>

<IfModule mod_expires.c>

    # Enable expirations
    ExpiresActive On

    # Default directive
    ExpiresDefault "access plus 1 month"

    # My favicon
    ExpiresByType image/x-icon "access plus 1 year”

    # Images
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"

    # CSS
    ExpiresByType text/css "access 1 month”

    # Javascript
    ExpiresByType application/javascript "access plus 1 year"

</IfModule>


Thank you.

The Forum post is edited by Outperformer 3000 Oct 22 '20
Chris_W
Chris_W Oct 23 '20
Rename your .htaccess to .htaccess.bak and unzip and upload the attached .htaccess file and see if that improves things.


Obviously change the site URL to the correct one.


The section below should always be last just before any php directives added by the server.


RedirectMatch /index$ https://mysite.de
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} !/ow_updates/index\.php
RewriteCond %{REQUEST_URI} !/ow_updates/
RewriteCond %{REQUEST_URI} !/ow_cron/run\.php
RewriteCond %{REQUEST_URI} !/e500\.php
RewriteCond %{REQUEST_URI} !/captcha\.php
#RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$  [NC]
RewriteCond %{REQUEST_FILENAME} (/|\.php|\.html|\.htm|\.xml|\.feed|robots\.txt|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php

The Forum post is edited by Chris_W Oct 23 '20
Attachments:
  htaccess.zip (1Kb)
Outperformer 3000
Outperformer 3000 Oct 23 '20
Hi Chris, Thank you for your help. But it didn't work better with this htaccess. Do you have another suggestion?
Chris_W
Chris_W Oct 23 '20
Have you checked at the bottom of the ow_includes/config.php file to make sure neither 'Debug' or 'Dev' mode are set to true. Both need to be set to false.


if ( defined('OW_CRON') )

{

    define('OW_DEBUG_MODE', false);

    define('OW_DEV_MODE', false);

    define('OW_PROFILER_ENABLE', false);

}

else

{

    /**

    * Make changes in this block if you want to enable DEV mode and DEBUG mode

    */


    define('OW_DEBUG_MODE', false);

    define('OW_DEV_MODE', false);

    define('OW_PROFILER_ENABLE', false);

}

The Forum post is edited by Chris_W Oct 23 '20
Patricia Zorrilla Leader
Patricia Zorrilla Oct 23 '20

I think that if sometimes it works fast and sometimes slow, it is not that it is something wrongly configured, because in this case it would always go at the same speed.

You have to think about things that can affect you.

* Simultaneous access of many users to your website, you have to look at how many users are connected when it goes slow and when it goes fast.

* If the server is shared between several websites, it may at times not have enough data throughput, enough memory or enough processing capacity. 

Chris_W
Chris_W Oct 23 '20
OK, when you first enter the site it loads in under 4 seconds, subsequent pages load slower and slower until the site stalls altogether.  I have an idea that your hosting is the problem.  I tested it in Chrome and Firefox with the same results.
Outperformer 3000
Outperformer 3000 Oct 23 '20
Yes, it's funny. I have another oxwall site on same host, with same settings and that site loads normal. Thank you, Chris and Patricia.
Chris_W
Chris_W Oct 23 '20
Just a thought, are you using cloudflare?  Have you tried switching back to php 5.6 and testing it?
Outperformer 3000
Outperformer 3000 Oct 23 '20
No, not using cloudflare. The problem is, the host only make avaivable 7.2, 7.3 and 7.4. They have deleted 5.6. You could still use it for a transitional period, for an extra charge. But not anymore.
Chris_W
Chris_W Oct 23 '20
Maybe that's when the problem started, as you said you didn't think it was always slow.


Outperformer 3000
Outperformer 3000 Oct 23 '20

But I do not understand, why my other site works like a charm with PHP 7.2 ...?


What can I do now? Do I have to make a new installation?

Chris_W
Chris_W Oct 24 '20
Isn't the slow site is on 7.3? There are some significant differences between 7.2 and 7.3. Try switching the site to 7.2 and clearing the site and browser cache, then try again.
Outperformer 3000
Outperformer 3000 Oct 24 '20
Both are on 7.2. How can I make a clean new installation without data loss?
Chris_W
Chris_W Oct 24 '20
Go to phpMyAdmin in your hosting control panel and export the whole database for the site, as a backup in case of errors. Then zip up and save your ow_userfiles folder. If you installed via Softaculous make a backup of the whole site, just in case you make a mistake. If you installed manually, just zip up the whole site, folders and files and save it.


Make your fresh install anywhere in a folder under the public_html folder, not in the existing site location. Install all the plugins and themes you had in your original installation. Unzip the copy of ow_userfiles into the new ow_userfiles folder.


Put your old site into maintenance mode. go to ow_includes/config.php and copy your database details. Transfer them to ow_includes/config.php in the new install. Also copy the site URL from that file, but don't transfer that (needed later). Check that the new site is working okay and tweak as required.


Once you are satisfied that the site is working. Remove the old site files and copy the new site files over. Go to ow_includes/config.php and change the site URL to the one copied from your old site.


If you have done everything correctly your mew site should be working. It may take a while for cached files to catch up.


If things go wrong, you can restore the old site from the backup you made.

The Forum post is edited by Chris_W Oct 24 '20
dave Team
dave Oct 24 '20

Hi,  nice job Chris_W and Patricia in helping out, i think you covered most of it Chris_W :)


The only thing else i can think of is that you said that both sites are with the same host, but are they on the same server as well.  If not, the other server may be a better server or configed slightly different.  Alot of hosts use servers until they are so broken they just replace them so that might be a possiblity as well.


Maybe ask your host if you can move your site to a different server.



dave Team
dave Oct 24 '20

Dont forget to also copy over your old password salt also from the old config file. If you dont then your logins wont work.


Also you could just restore the core files and not have to do a whole new install.   Also remember if you do a whole new install  you will need to reinstall all your plugins.  Before you fire up the site after the install be sure you do this or your files wont match the db for the plugins and it will blow up.

The Forum post is edited by dave Oct 24 '20
Chris_W
Chris_W Oct 24 '20
Or just save your old config file and copy it over.
dave Team
dave Oct 24 '20

here is just the core files..



Attachments:
  corefilesonly.zip (10155Kb)
Pages: 1 2 »