Forum Replies Created

Viewing 15 replies - 1 through 15 (of 47 total)
  • Thread Starter hack3rcon

    (@hack3rcon)

    Hello,

    Thank you so much for your reply.

    My question is about Apache optimization.

    Thread Starter hack3rcon

    (@hack3rcon)

    Hello @bcworkz,
    Thank you for your opinion.
    How can I do it? Do you recommend some plug-ins like the Duplicator or…? Are they free?

    Thank you.

    Thread Starter hack3rcon

    (@hack3rcon)

    Hello @soberbanda,
    Thank you so much for your help.
    I added below lines to my “wp-config.php” file:

    define( 'WP_HOME', 'http://example.com' );
    define( 'WP_SITEURL', 'http://example.com' );

    And about the “functions.php” file, as you see my website using two theme’s:

    ./wp-content/themes/example/functions.php
    ./wp-content/themes/twentytwentyone/functions.php

    Should I add below lines to both of them and refresh my WordPress website and then remove those lines?

    update_option( 'siteurl', 'http://example.com' );
    update_option( 'home', 'http://example.com' );

    And about the DNS records, I can’t reveal my website name because of the security:
    Link

    • This reply was modified 4 years, 4 months ago by hack3rcon.
    Thread Starter hack3rcon

    (@hack3rcon)

    I don’t have any access to the DNS server and I can’t check it.
    How can I debug the VirtualHosts config file? In your opinion, is my VirtualHosts file incorrect?

    Thread Starter hack3rcon

    (@hack3rcon)

    @gappiah, which one of those files must be edited?

    Thread Starter hack3rcon

    (@hack3rcon)

    Thanks @soberbanda, but I got below error:

    Oct 03 11:53:30 example httpd[1183294]: AH00526: Syntax error on line 26 of /etc/>
    Oct 03 11:53:30 example httpd[1183294]: RewriteRule: bad flag delimiters
    Thread Starter hack3rcon

    (@hack3rcon)

    Hello @gappiah,
    I edited the “wp-config.php” file and added those lines, but about the “functions.php” file, which file must be edited:

    ./wp-content/plugins/recent-posts-widget-extended/includes/functions.php
    ./wp-content/themes/example/functions.php
    ./wp-content/themes/twentytwentyone/functions.php
    ./wp-includes/functions.php

    Thank you.

    Thread Starter hack3rcon

    (@hack3rcon)

    Hello @soberbanda,
    Thank you for your help.
    I changed my VirtualHosts configuration and it is now as follows:

    <VirtualHost *:80>
    ServerName www.example1.com
    Redirect 301 / http://www.example2.com
    </VirtualHost>
    
    <VirtualHost *:80>
    ServerAdmin root@localhost
    ServerName www.example2.com
    ServerAlias www.example2.com
    DocumentRoot /var/www/wp
    ErrorLog /var/log/httpd/wordpress_error.log
    CustomLog /var/log/httpd/wordpress_access.log common
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =example2.com [OR]
    RewriteCond %{SERVER_NAME} =www.example2.com [OR]
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    Redirect permanent / https://www.example2.com
    
    TraceEnable off
    ServerSignature Off
    
    # SSL
    SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
    SSLHonorCipherOrder on
    SSLCompression off
    SSLSessionTickets off
    
    </VirtualHost>
    
    <Directory /var/www/wp>
    # Options -Indexes +FollowSymLinks
    Options -Indexes
    AllowOverride All
    Require all granted
    </Directory>

    Then, I did:
    # systemctl restart httpd
    When I enter “example2.com” in my browser, then it showed me “example1.com”!
    Can it because of the wrong configuration in the domain name panel (NS1.example1.com) or DNS server?

    Thread Starter hack3rcon

    (@hack3rcon)

    Thank you.
    My VirtualHost is:

    <VirtualHost *:80>
    ServerAdmin root@localhost
    ServerName www.example2.com
    ServerAlias www.example2.com
    DocumentRoot /var/www/wp
    ErrorLog /var/log/httpd/wordpress_error.log
    CustomLog /var/log/httpd/wordpress_access.log common
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =example2.com [OR]
    RewriteCond %{SERVER_NAME} =www.example2.com [OR]
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    Redirect permanent / https://www.example2.com
    
    TraceEnable off
    ServerSignature Off
    
    # SSL
    SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
    SSLHonorCipherOrder on
    SSLCompression off
    SSLSessionTickets off
    
    </VirtualHost>
    
    <Directory &quot;/var/www/wp>
    # Options -Indexes +FollowSymLinks
    Options -Indexes
    AllowOverride All
    Require all granted
    </Directory></code></pre>

    And .htaccess file is:

    
    # BEGIN W3TC Browser Cache
    <IfModule mod_mime.c>
        AddType text/css .css
        AddType text/x-component .htc
        AddType application/x-javascript .js
        AddType application/javascript .js2
        AddType text/javascript .js3
        AddType text/x-js .js4
        AddType video/asf .asf .asx .wax .wmv .wmx
        AddType video/avi .avi
        AddType image/bmp .bmp
        AddType application/java .class
        AddType video/divx .divx
        AddType application/msword .doc .docx
        AddType application/vnd.ms-fontobject .eot
        AddType application/x-msdownload .exe
        AddType image/gif .gif
        AddType application/x-gzip .gz .gzip
        AddType image/x-icon .ico
        AddType image/jpeg .jpg .jpeg .jpe
        AddType image/webp .webp
        AddType application/json .json
        AddType application/vnd.ms-access .mdb
        AddType audio/midi .mid .midi
        AddType video/quicktime .mov .qt
        AddType audio/mpeg .mp3 .m4a
        AddType video/mp4 .mp4 .m4v
        AddType video/mpeg .mpeg .mpg .mpe
        AddType video/webm .webm
        AddType application/vnd.ms-project .mpp
        AddType application/x-font-otf .otf
        AddType application/vnd.ms-opentype ._otf
        AddType application/vnd.oasis.opendocument.database .odb
        AddType application/vnd.oasis.opendocument.chart .odc
        AddType application/vnd.oasis.opendocument.formula .odf
        AddType application/vnd.oasis.opendocument.graphics .odg
        AddType application/vnd.oasis.opendocument.presentation .odp
        AddType application/vnd.oasis.opendocument.spreadsheet .ods
        AddType application/vnd.oasis.opendocument.text .odt
        AddType audio/ogg .ogg
        AddType application/pdf .pdf
        AddType image/png .png
        AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
        AddType audio/x-realaudio .ra .ram
        AddType image/svg+xml .svg .svgz
        AddType application/x-shockwave-flash .swf
        AddType application/x-tar .tar
        AddType image/tiff .tif .tiff
        AddType application/x-font-ttf .ttf .ttc
        AddType application/vnd.ms-opentype ._ttf
        AddType audio/wav .wav
        AddType audio/wma .wma
        AddType application/vnd.ms-write .wri
        AddType application/font-woff .woff
        AddType application/font-woff2 .woff2
        AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
        AddType application/zip .zip
    </IfModule>
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType text/css A31536000
        ExpiresByType text/x-component A31536000
        ExpiresByType application/x-javascript A31536000
        ExpiresByType application/javascript A31536000
        ExpiresByType text/javascript A31536000
        ExpiresByType text/x-js A31536000
        ExpiresByType video/asf A31536000
        ExpiresByType video/avi A31536000
        ExpiresByType image/bmp A31536000
        ExpiresByType application/java A31536000
        ExpiresByType video/divx A31536000
        ExpiresByType application/msword A31536000
        ExpiresByType application/vnd.ms-fontobject A31536000
        ExpiresByType application/x-msdownload A31536000
        ExpiresByType image/gif A31536000
        ExpiresByType application/x-gzip A31536000
        ExpiresByType image/x-icon A31536000
        ExpiresByType image/jpeg A31536000
        ExpiresByType image/webp A31536000
        ExpiresByType application/json A31536000
        ExpiresByType application/vnd.ms-access A31536000
        ExpiresByType audio/midi A31536000
        ExpiresByType video/quicktime A31536000
        ExpiresByType audio/mpeg A31536000
        ExpiresByType video/mp4 A31536000
        ExpiresByType video/mpeg A31536000
        ExpiresByType video/webm A31536000
        ExpiresByType application/vnd.ms-project A31536000
        ExpiresByType application/x-font-otf A31536000
        ExpiresByType application/vnd.ms-opentype A31536000
        ExpiresByType application/vnd.oasis.opendocument.database A31536000
        ExpiresByType application/vnd.oasis.opendocument.chart A31536000
        ExpiresByType application/vnd.oasis.opendocument.formula A31536000
        ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
        ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
        ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
        ExpiresByType application/vnd.oasis.opendocument.text A31536000
        ExpiresByType audio/ogg A31536000
        ExpiresByType application/pdf A31536000
        ExpiresByType image/png A31536000
        ExpiresByType application/vnd.ms-powerpoint A31536000
        ExpiresByType audio/x-realaudio A31536000
        ExpiresByType image/svg+xml A31536000
        ExpiresByType application/x-shockwave-flash A31536000
        ExpiresByType application/x-tar A31536000
        ExpiresByType image/tiff A31536000
        ExpiresByType application/x-font-ttf A31536000
        ExpiresByType application/vnd.ms-opentype A31536000
        ExpiresByType audio/wav A31536000
        ExpiresByType audio/wma A31536000
        ExpiresByType application/vnd.ms-write A31536000
        ExpiresByType application/font-woff A31536000
        ExpiresByType application/font-woff2 A31536000
        ExpiresByType application/vnd.ms-excel A31536000
        ExpiresByType application/zip A31536000
    </IfModule>
    <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
        <IfModule mod_mime.c>
            # DEFLATE by extension
            AddOutputFilter DEFLATE js css htm html xml
        </IfModule>
    </IfModule>
    <FilesMatch &quot;\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$&quot;>
        FileETag MTime Size
        <IfModule mod_headers.c>
             Header unset Set-Cookie
        </IfModule>
    </FilesMatch>
    <FilesMatch &quot;\.(html|htm|rtf|rtx|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|TXT|XSD|XSL|XML)$&quot;>
        FileETag MTime Size
    </FilesMatch>
    <FilesMatch &quot;\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|WEBP|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|_TTF|WAV|WMA|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW|ZIP)$&quot;>
        FileETag MTime Size
        <IfModule mod_headers.c>
             Header unset Set-Cookie
        </IfModule>
    </FilesMatch>
    <FilesMatch &quot;\.(bmp|class|doc|docx|eot|exe|ico|json|mdb|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|JSON|MDB|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$&quot;>
        <IfModule mod_headers.c>
             Header unset Last-Modified
        </IfModule>
    </FilesMatch>
    <IfModule mod_headers.c>
        Header set Referrer-Policy &quot;no-referrer-when-downgrade&quot;
        Header always edit Set-Cookie (.*) &quot;$1; HttpOnly&quot;
        Header always edit Set-Cookie (.*) &quot;$1; Secure&quot;
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteCond %{HTTPS} =on
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{SERVER_PORT} =443
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:X-Forwarded-Proto} =https [NC]
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteRule .* - [E=W3TC_ENC:_gzip]
        RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
        RewriteRule .* - [E=W3TC_PREVIEW:_preview]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =&quot;&quot;
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
        RewriteCond %{REQUEST_URI} \/$
        RewriteCond &quot;%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}&quot; -f
        RewriteRule .* &quot;/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}&quot; [L]
    </IfModule>
    # END W3TC Page Cache core
    
    # BEGIN rlrssslReallySimpleSSL rsssl_version[4.0.7]
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>
    # END rlrssslReallySimpleSSL
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Which part is wrong?

    Thread Starter hack3rcon

    (@hack3rcon)

    Hello,
    I think that I must not update my WordPress!

    Thread Starter hack3rcon

    (@hack3rcon)

    Yes. I used Brave and Google Chrome.
    Can it because of WordPress update?

    Thread Starter hack3rcon

    (@hack3rcon)

    Yes.

    Thread Starter hack3rcon

    (@hack3rcon)

    Hello,
    Thank you so much.
    Excuse me, I use “wp” command-line tool to update the WordPress. Can I use that tool to install those plugins? I don’t have any experiences with those plugins, do they need any special configurations?

    Thread Starter hack3rcon

    (@hack3rcon)

    Excuse me, affected files?

    Thread Starter hack3rcon

    (@hack3rcon)

    Hello,
    Any idea?

Viewing 15 replies - 1 through 15 (of 47 total)