Thursday, March 25, 2021

Renew gcloud platform ssl certificate

Open console cloud and go to vm instances click on ssh  and follow the below command :-

 1) wget https://dl.eff.org/certbot-auto && chmod a+x certbot-auto

2) ./certbot-auto certonly --webroot -w /opt/bitnami/apps/wordpress/htdocs/ -d example.com -d www.example.com (change example to your website name)

3) ./certbot-auto renew --dry-run

4) sudo crontab -e       /*( check the below code available or not :

0 0 * * * ./certbot-auto renew --quiet --no-self-upgrade ( check the this                                                     line of code is available

0 12 * * * ./certbot-auto renew --quiet --no-self-upgrade   ( or not using 

down arrow key then press ctrl+x then press y hit enter)*/

5) sudo nano /opt/bitnami/apache2/conf/bitnami/bitnami.conf  /*(check the config using down arrow                                                                                                             key and check below config 

                                            ( ServerName www.example.com

                                                        ( ServerAlias example.com

                    ( Redirect permanent / https://www.example.com/

            (   Then press ctrl+x then press y hit enter to save your file)*/


6)sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php  /* (  Then check  below config :-

     ( define('WP_HOME','https://www.example.com');

     ( define('WP_SITEURL','https://www.example.com'

then press ctrl+x then press y hit enter to save your file);*/

7) sudo /opt/bitnami/ctlscript.sh restart apache



Note: You can also skip the 5 and 6 points.


Wednesday, March 24, 2021

How to install WordPress in digital ocean

First go to droplet commond line login your droplet after that 

1) mkdir var

2) cd var

3) mkdir www

4) cd www

5) wget http://wordpress.org/latest.tar.gz  (# install wordpress in directory for zip file)

6) tar -xzvf latest.tar.gz     (#extract zip )

7) rm latest.tra.gz            (#Delete file)

8)rm -Rf html        (# Delet file)

9) mv wordpress html           (# rename the directory)

10)apt install mysql-client-core-5.7

wp-rocket settings

Step:1 Cache enable caching for mobile devices  Step: 2 File optimization:-      Step:3 Media                      Step: 4 Preload  Step 5 A...