Latest Posts

Ezoic Configuration

I was using Ezoic and Ezoic hosting for a while. Here are some notes I would like to write down for my future references.


Ezoic Hosting Change

Here are dns changes for Ezoic change for both @ and www Alias records.



Create an alias with name = @ and value =
dualstack.aa87e78b083d111e9a4800af31bb8397-869364623.us-east-1.elb.amazonaws.com



Second alias with name = www and vaule =

dualstack.aa87e78b083d111e9a4800af31bb8397-869364623.us-east-1.elb.amazonaws.com


Own VPS Hosting

To change hosting from Ezoic back to own VPS hosting:
1  Nginx Change



root@5fbe841d1f40:/# cd /etc/nginx/conf.d
root@5fbe841d1f40:/etc/nginx/conf.d# nano wordpress.conf 

server {
    listen       80;
    server_name  51sec.org www.51sec.org 132.145.98.41;

location / {
    proxy_pass       http://132.145.98.41:10000;
    proxy_redirect             off;
    proxy_http_version         1.1;
    proxy_set_header Upgrade   $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host      $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

root@5fbe841d1f40:/etc/nginx/conf.d# service nginx restart


2  wp_config.php change
Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.
define( 'WP_HOME', '//www.51sec.org' );
define( 'WP_SITEURL', '//www.51sec.org' );
This is not necessarily the best fix, it’s just hard-coding the values into the site itself. You won’t be able to edit them on the General settings page anymore when using this method.

Edit functions.php Edit functions.php

If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.
  • FTP to the site, and get a copy of the active theme’s functions.php file. You’re going to edit it in a simple text editor and upload it back to the site.
  • Add these two lines to the file, immediately after the initial “<?php” line:
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );

Important! Do not leave this code in the functions.php file. Remove them after the site is up and running again.
Note: If your theme doesn’t have a functions.php file create a new one with a text editor. Add the <?php tag and the two lines using your own URL instead of example.com:
1
2
3
<?php
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );
Upload this file to your theme directory. Remove the lines or the remove the file after the site is up and running again.
Note: https://wordpress.org/support/article/changing-the-site-url/


Ezoic MySQL DB Connection from phpmyadmin docker


Run PHPMyAdmin docker from https://labs.play-with-docker.com/ and connect it to wordpress.db.ezoic.com database server. 
[node1] (local) root@192.168.0.33 ~
docker run --name myadmin -d -e PMA_HOST=wordpress.db.ezoic.com -p 80:80 phpmyadmin/phpmyadmin
Unable to find image 'phpmyadmin/phpmyadmin:latest' locally
latest: Pulling from phpmyadmin/phpmyadmin
6ec8c9369e08: Pull complete 
081a822af595: Pull complete 
bb5bea655fca: Pull complete 
1e5d9e6a44c7: Pull complete 
51c80d726a75: Pull complete 
41f3ef5189e5: Pull complete 
c1a9c1efdc83: Pull complete 
348c6ac67813: Pull complete 
d16c4c4b2a5f: Pull complete 
035ee560bfbc: Pull complete 
4c16f7d16e86: Pull complete 
560feb679e04: Pull complete 
0bc8defe61af: Pull complete 
b80e31e8a7c4: Pull complete 
f94927b2554c: Pull complete 
416dcf230b63: Pull complete 
a9d24c9f2a61: Pull complete 
4cae08d2f851: Pull complete 
Digest: sha256:69eaf4a23598e9986b62bbfde9e8e3ae773f0da53406723e6f027582e0310274
Status: Downloaded newer image for phpmyadmin/phpmyadmin:latest
67c458459487a00b7154e2ba97a24710be6c40879d7150ab5ba0402cc472de92
[node1] (local) root@192.168.0.33 ~
$ 

You can browser to phpMyAdmin web page and log in with username and password from Ezoic hosting. 


References








No comments