Select Page
How to upgrade to PHP7 version from .htaccess

How to upgrade to PHP7 version from .htaccess

In case that you can’t use the PHP Version Manager in cPanel, you can change your PHP version by adding a line of code to your .htaccess file of your wordpress website.

To apply these changes you can use a FPT software like FileZilla (this is what i usually use). Locate your .httaccess file and at the top of the document add the following line of code:

1
AddType application/x-httpd-php71 .php

Or this line of code if the first one doesn’t work for you

1
Action application/x-httpd-php71 /cgi-sys/php71-fcgi-starter.fcgi

Here is an example

That’s all there is to it.

How to fix “Divi Builder Timeout” Error

How to fix “Divi Builder Timeout” Error

In this article i’m going to show you how to fix the divi builder timeout error with a simple line of code. By adding a mod_substitute directive to your .htaccess, you encrease the processing memory for the Divi Builder. Before you start, keep in mind that you should backup your file, before you make any changes.

Go ahead and locate your .htaccess file, open it, and insert the following code at the top of the document.

1
2
3
4
5
# BEGIN FIX divi builder timeout error
<IfModule mod_substitute.c>
SubstituteMaxLineLength 10M
</IfModule>
# END FIX divi builder timeout error

You can read more about mod_substitute directive in apache’s documentation.

How to Redirect all HTTP requests to HTTPS with htaccess

How to Redirect all HTTP requests to HTTPS with htaccess

Access your website via FTP or via your server’s File Manager and search at the root of your WordPress instalation for the .htaccess file. Here you have 3 solutions to solve the same question:

How to redirect all HTTP request to HTTPS.

Before you edit the .htaccess file, I recommend to make a backup to be able to revert your changes (in case something goes wrong).

So here you go, copy and paste the code below in your .htaccess file, save it, and re-upload it.

Solution 1

1
2
3
RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

These lines of code will direct all HTTP requests to https://www.example.com as well as redirect https://example.com to https://www.example.com.

Solution 2

1
2
3
4
5
RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]<br />
RewriteCond %{http_host} ^example.com [NC]<br />
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]

Solution 3

1
2
3
4
5
6
RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]<br />
RewriteCond %{HTTP_HOST} ^www.domain.com$ [OR]<br />
RewriteCond %{HTTPS_HOST} ^domain.com$<br />
RewriteRule ^(.*)$ "https\:\/\/www\.domain\.com\/$1" [R=301,L]

Leave a comment with what worked for you. Go ahead and share if you have a different aproach.