Learn about Centmin Mod LEMP Stack today
Register Now

Wordpress new wordpress install

Discussion in 'Blogs & CMS usage' started by Dan Badea, Dec 2, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes that is correct - you can see overview of Centmin Mod official config files page at https://centminmod.com/configfiles.html listing how main hostname has it's own nginx vhost at /usr/local/nginx/conf/conf.d/virtual.conf separate from other added domains in /usr/local/nginx/conf/conf.d/ i.e. /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf

     
  2. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    step 1 or step 2 or step 1 + step 2 ?
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    for what ?

    as per initial install page https://centminmod.com/install.html tip #12
    Essentially you read and follow all Getting Started Guide steps outlined at https://centminmod.com/getstarted.html which apply to you setup/desired usage. So step 1, then step 2, then step 3 and so forth
     
  4. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
  5. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yes all steps that apply to your situation. If you use reverse proxy or proxy service such as Cloudflare, Incapsula, Google PageSpeed Service, Varnish Cache in front of Nginx web server, then step 5 would apply to you. If not skip step 5.
     
  6. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    exist the possibility to somebody (you for example) check all steps if it is ok from outside or from inside ?

    or make you this things (what is needed to be safe, to have email ok, good performance..) an you tell me the price ?
     
    Last edited by a moderator: Dec 4, 2019
  7. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    My rates for check ups would usually start at US$150/hr (minimum 1hr) depending on what needs to be done and for server optimisation/tuning there's fixed price packages for 2-4 days work starting in 4 figure $$$$ rates. You can contact me via private conversation here.

    But my advice on learning about Centmin Mod at https://community.centminmod.com/threads/guide-to-learning-more-about-centmin-mod.10838/ applies, setup a test VPS not live site and do all the Centmin Mod test install and getting started setup testing on this test VPS and learn the ropes. This way messing up won't matter as you can destroy test VPS/reinstall and try again until you are more familiar with Centmin Mod.
     
  8. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    I'm lost,

    I think that eva2000 make all settings in LEMP for wordpress, but... I think that is needed a little fine tuning.

    I have this errors in WPML

    "
    It looks like languages per directories will not function. Details

    This can be a result of either:

    • WordPress is installed in a directory (not root) and you're using default links.
    • URL rewriting is not enabled in your web server.
    • The web server cannot write to the .htaccess file
    How to fix
    When WPML accesses https://bga-rework-stations.com/ro?____icl_validate_directory=1 it gets:




    The expected value is:
    <!--https://bga-rework-stations.com-->

    "

    here it is a paradox, when you click on the flags... it work, it change the language correct



    it is clear that is no apache server here - no .hataccess

    here I'm lost
     
    Last edited: Dec 6, 2019
  9. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  10. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    yes sir, I can manage to install a high quality (I hope) centminmod / wordpress on kimsufi server. my questions is:

    what is best ?!

    wordpress MU multi site or
    wordpress + WPML or
    for every language a new wordpress instalation ?
    and
    how is best... es.mydomain.com or mydomain.com/es/ ?
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    well Centmin Mod centmin.sh menu option 22 doesn't support Wordpress multi-site as I never used multi-site so configuration at nginx and wordpress level would be left up to you to do.

    non-English site setups I am also not familiar with but WPML might seem like best way but best to ask at say at https://wordpress.stackexchange.com/

    mydomain.com/es seems like best way if it's supported at wordpress plugin level
     
  12. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    I'm stuck with few tuning. first:

    1 - where can I add .webp in roles for nginx to cash the webp image ? for this :
    Leverage browser caching for the following cacheable resources:

    2 - redis , how can I activate ? I'l put plugin redis plugin in wordpress but seems that nothing happening

    the 1 - point I find it :)
    the 2 - point... I think that I find it but... how can I test it ? it not was installed the redis, I install them and check... with redis-cli monitor... something happening in screen but only with page that was no cached... with F5 and refresh... nothing
    is ok ?
     
    Last edited: Dec 16, 2019
  13. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    redis plugin is for object caching so only improves the queries to mysql side nothing front end and if you don't have alot of traffic you won't notice any different anyway as any caching via wp plugins wouldn't be that much faster as they still have to be processed through PHP.

    You don't want to be caching a PWA service workers manifest.json file as you need for it to be dynamic and change. So a short browser cache time for that is ideal.

    As to upload directory .webP images - how are you generating those webP images ? Centmin Mod centmin.sh menu option 22 already takes care of webP browser cache if you generated images in naming format of imagename.png.webp or imagename.jpg.webp for 30 day browser cache. But you have naming format minus the image original extension of imagename.webp so Centmin Mod's default nginx routine in your wpsecure include file /usr/local/nginx/conf/wpincludes/yourdomain.com/wpsecure_yourdomain.com.conf in your /usr/local/nginx/conf/conf.d/domain.com.ssl.conf nginx vhost won't pick it up.

    The relevant section in the wpsecure include file for this is
    Code (Text):
    # WebP extension support if you are converting /uploads images to webp
    location ~ ^/wp-content/uploads/ {
      #pagespeed off;
      #pagespeed unplugged;
      #autoindex on;
      #add_header X-Robots-Tag "noindex, nofollow";
      location ~* ^/wp-content/uploads/(.+/)?(.+)\.(png|jpe?g)$ {
        expires 30d;
        #add_header Vary "Accept-Encoding";
        add_header Vary "Accept";
        add_header Cache-Control "public, no-transform";
        try_files $uri$webp_extension $uri =404;
      }
    }

    There was a bug fix I made so if you see Vary Accept-Encoding add_header comment it out and use the Vary Accept add_header as you see above
     
  14. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    let see... the webp generate and serve the webp is with what I fight now. can you recommend me with what can I generate and serve the webp format ? the problem is that google want to be served the webp from the original wordpress gallery place. to cache the files I use WpRocket, the only one that work ok or the only one that I can make to work ok. do you have another idea for the cache plugin ? the autoptimize plugin that was installed with the option 22 from centminmod I can't manage to work ok.

    and... to understand exactly how is work...

    1 - I upload a image.png to gallery, when is uploaded, a wordpres plugin will convert the image.png to image.png.webp and store this image.png.webp to galery folder or another folder and same plugin or another plugin will serve the image.png.webp to an compatible browser.

    or

    2 - I upload a image.png to gallery, this image is stored in the gallery folder. when the wordpress encounter a webp compatible browser will convert and serve a image.png.webp version to this browser. the image.png.webp not really exist in the gallery folder

    what scenario it used ?
    in your code from above I didn't see "webp" in the rules.
     
    Last edited: Dec 17, 2019
  15. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    12:29 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  16. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    we write in same time :) look up please
     
  17. Dan Badea

    Dan Badea New Member

    23
    2
    3
    Dec 2, 2019
    Ratings:
    +3
    Local Time:
    4:29 PM
    yes sir, it working like a charm... another two questions

    1 - .json - https://bga-rework-stations.com/superpwa-manifest.json (expiration not specified) is no needed ?
    2 - redirection from www.mydomain.com and mydomain.com to ssl https:// mydomain.com don't function

    "Does not redirect HTTP traffic to HTTPS
    If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. Learn more.
    "

    I have this at usr/local/nginx/conf/conf.d/bga-rework-stations.com.ssl.conf

    Code:
    # redirect from www to non-www  forced SSL
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
     server {
       server_name bga-rework-stations.com www.bga-rework-stations.com;
        return 301 https://$server_name$request_uri;
     }
    
    and this at .conf

    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    server {
                listen   80;
                server_name bga-rework-stations.com;
                return 301 $scheme://www.bga-rework-stations.com$request_uri;
           }
    seems that non www redirect to www but no redirect to SSL

    update - simply read this... https://centminmod.com/nginx_domain_dns_setup.html#httpsredirect

    work like a charm.

    last question, why pingdom say "56 Compress components with gzip"

    only... what about .json and why pingdom give low score at compress components with gzip ?
     
    Last edited: Dec 17, 2019