Blog

  • When PHP html_entity_decode() function fails

    Use this:

    function replace_tags( $text ) {

        $replace = array(
            '%20' => ' ',
            '+'   => ' ',
            '%7F' => ' ',
            '%81' => ' ',
            '%C5%8D' => ' ',
            '%8F' => ' ',
            '%C2%90' => ' ',
            '%9D' => ' ',
            '%C2%A0' => ' ',
            '%C2%AD' => ' ',
            '%21' => '!',
            '%22' => '"',
            '%23' => '#',
            '%24' => '$',
            '%25' => '%',
            '%26' => '&',
            '%27' => "'",
            '%28' => '(',
            '%29' => ')',
            '%2A' => '*',
            '%2B' => '+',
            '%2C' => ',',
            '%2D' => '-',
            '%2E' => '.',
            '%2F' => '/',
            '%30' => '0',
            '%31' => '1',
            '%32' => '2',
            '%33' => '3',
            '%34' => '4',
            '%35' => '5',
            '%36' => '6',
            '%37' => '7',
            '%38' => '8',
            '%39' => '9',
            '%3A' => ':',
            '%3B' => ';',
            '%3C' => '<',
            '%3D' => '=',
            '%3E' => '>',
            '%3F' => '?',
            '%40' => '@',
            '%41' => 'A',
            '%42' => 'B',
            '%43' => 'C',
            '%44' => 'D',
            '%45' => 'E',
            '%46' => 'F',
            '%47' => 'G',
            '%48' => 'H',
            '%49' => 'I',
            '%4A' => 'J',
            '%4B' => 'K',
            '%4C' => 'L',
            '%4D' => 'M',
            '%4E' => 'N',
            '%4F' => 'O',
            '%50' => 'P',
            '%51' => 'Q',
            '%52' => 'R',
            '%53' => 'S',
            '%54' => 'T',
            '%55' => 'U',
            '%56' => 'V',
            '%57' => 'W',
            '%58' => 'X',
            '%59' => 'Y',
            '%5A' => 'Z',
            '%5B' => '[',
            '%5C' => '\\',
            '%5D' => ']',
            '%5E' => '^',
            '%5F' => '_',
            '%60' => '`',
            '%61' => 'a',
            '%62' => 'b',
            '%63' => 'c',
            '%64' => 'd',
            '%65' => 'e',
            '%66' => 'f',
            '%67' => 'g',
            '%68' => 'h',
            '%69' => 'i',
            '%6A' => 'j',
            '%6B' => 'k',
            '%6C' => 'l',
            '%6D' => 'm',
            '%6E' => 'n',
            '%6F' => 'o',
            '%70' => 'p',
            '%71' => 'q',
            '%72' => 'r',
            '%73' => 's',
            '%74' => 't',
            '%75' => 'u',
            '%76' => 'v',
            '%77' => 'w',
            '%78' => 'x',
            '%79' => 'y',
            '%7A' => 'z',
            '%7B' => '{',
            '%7C' => '|',
            '%7D' => '}',
            '%7E' => '~',
            '%E2%82%AC' => '€',
            '%E2%80%9A' => ',',
            '%C6%92' => 'ƒ',
            '%E2%80%9E' => '„',
            '%E2%80%A6' => '...',
            '%E2%80%A0' => '†',
            '%E2%80%A1' => '‡',
            '%CB%86'    => '^',
            '%E2%80%B0' => '‰',
            '%C5%A0'    => 'Š',
            '%E2%80%B9' => '‹',
            '%C5%92'    => 'Œ',
            '%C5%BD'    => 'Ž',
            '%E2%80%98' => '‘',
            '%E2%80%99' => '’',
            '%E2%80%9C' => '“',
            '%E2%80%9D' => '”',
            '%E2%80%A2' => '•',
            '%E2%80%93' => '-',
            '%E2%80%94' => '-',
            '%CB%9C'    => '~',
            '%E2%84'    => '™',
            '%C5%A1'    => 'š',
            '%E2%80'    => '›',
            '%C5%93'    => 'œ',
            '%C5%BE'    => 'ž',
            '%C5%B8'    => 'Ÿ',
            '%C2%A1'    => '¡',
            '%C2%A2'    => '¢',
            '%C2%A3'    => '£',
            '%C2%A4'    => '¤',
            '%C2%A5'    => '¥',
            '%C2%A6'    => '¦',
            '%C2%A7'    => '§',
            '%C2%A8'    => '¨',
            '%C2%A9'    => '©',
            '%C2%AA'    => 'a',
            '%C2%AB'    => '«',
            '%C2%AC'    => '¬',
            '%C2%AE'    => '®',
            '%C2%AF'    => '¯',
            '%C2%B0'    => '°',
            '%C2%B1'    => '±',
            '%C2%B2'    => '2',
            '%C2%B3'    => '3',
            '%C2%B4'    => '´',
            '%C2%B5'    => 'µ',
            '%C2%B6'    => '¶',
            '%C2%B7'    => '·',
            '%C2%B8'    => '¸',
            '%C2%B9'    => '1',
            '%C2%BA'    => '0',
            '%C2%BB'    => '»',
            '%C2%BC'    => '¼',
            '%C2%BD'    => '½',
            '%C2%BE'    => '¾',
            '%C2%BF'    => '¿',
            '%C3%80'    => 'À',
            '%C3%81'    => 'Á',
            '%C3%82'    => 'Â',
            '%C3%83'    => 'Ã',
            '%C3%84'    => 'Ä',
            '%C3%85'    => 'Å',
            '%C3%86'    => 'Æ',
            '%C3%87'    => 'Ç',
            '%C3%88'    => 'È',
            '%C3%89'    => 'É',
            '%C3%8A'    => 'Ê',
            '%C3%8B'    => 'Ë',
            '%C3%8C'    => 'Ì',
            '%C3%8D'    => 'Í',
            '%C3%8E'    => 'Î',
            '%C3%8F'    => 'Ï',
            '%C3%90'    => 'Ð',
            '%C3%91'    => 'Ñ',
            '%C3%92'    => 'Ò',
            '%C3%93'    => 'Ó',
            '%C3%94'    => 'Ô',
            '%C3%95'    => 'Õ',
            '%C3%96'    => 'Ö',
            '%C3%97'    => 'x',
            '%C3%98'    => 'Ø',
            '%C3%99'    => 'Ù',
            '%C3%9A'    => 'Ú',
            '%C3%9B'    => 'Û',
            '%C3%9C'    => 'Ü',
            '%C3%9D'    => 'Ý',
            '%C3%9E'    => 'Þ',
            '%C3%9F'    => 'ß',
            '%C3%A0'    => 'à',
            '%C3%A1'    => 'á',
            '%C3%A2'    => 'â',
            '%C3%A3'    => 'ã',
            '%C3%A4'    => 'ä',
            '%C3%A5'    => 'å',
            '%C3%A6'    => 'æ',
            '%C3%A7'    => 'ç',
            '%C3%A8'    => 'è',
            '%C3%A9'    => 'é',
            '%C3%AA'    => 'ê',
            '%C3%AB'    => 'ë',
            '%C3%AC'    => 'ì',
            '%C3%AD'    => 'í',
            '%C3%AE'    => 'î',
            '%C3%AF'    => 'ï',
            '%C3%B0'    => 'ð',
            '%C3%B1'    => 'ñ',
            '%C3%B2'    => 'ò',
            '%C3%B3'    => 'ó',
            '%C3%B4'    => 'ô',
            '%C3%B5'    => 'õ',
            '%C3%B6'    => 'ö',
            '%C3%B7'    => '÷',
            '%C3%B8'    => 'ø',
            '%C3%B9'    => 'ù',
            '%C3%BA'    => 'ú',
            '%C3%BB'    => 'û',
            '%C3%BC'    => 'ü',
            '%C3%BD'    => 'ý',
            '%C3%BE'    => 'þ',
            '%C3%BF'    => 'ÿ'
        );
    
        foreach( $replace as $what => $with ) {
            $text = str_replace( $what, $with, $text );
        }
    
        return $text;
    
    }
  • WooCommerce add custom product type

    Great guide here: https://www.ibenic.com/custom-woocommerce-product-type/

    Following this tutorial will get you to a point where you will have a working custom product type, but it will be missing the Inventory tab in the back-end

    To fix that, you will need to add the following JS to your admin_footer method you’ve already created following the tutorial:

    jQuery('.inventory_options').addClass('show_if_advanced').show();
    <?php if ( $is_advanced ) { ?>
    jQuery('.inventory_options').show();
    <?php } ?>

    See more here: https://stackoverflow.com/questions/43109755/how-to-enable-price-and-inventory-for-custom-product-type-in-woocommerce

    Also, after following the tutorial, chances are that your product will not save correctly. It will save as Simple product instead of your custom product type.

    To fix that, you need to add a constructor to your custom product class, the one that extends WP_Product.

    The constructor should contain the following:

    public function __construct( $product ) {
      $this->product_type = 'advanced';
      parent::__construct( $product );
    }
  • SASS syntax

    Basic watch

    sass --watch a.scss:a.css

    Watch and output minified

    sass --watch a.scss:a.css --style compressed

    Remove source map

    sass --no-source-map --watch style.scss:style.css
  • Connect to different database using wpdb

    $mydb = new wpdb('username','password','database','localhost');
  • Keyword list to prevent spam comments

    You can paste the following list in Settings -> Discussion -> Disallowed Comment Keys

    Keywords

    darknet
    deepweb
    darkweb
    drug
    crack
    tor
    viagra
    genrico
    thadeus
    tamoxifen
    nolvadex
    counterfeit
    dapoxetine
    potex
    fenofibrate
    trileptal
    uroxatral
    pill
    tricor
    alfuzosin
    bupropion
    meds
    masturb
    masturbation
    pharma
    prednison
    illicit
    stromectol
    casino
    vpn
    slot
    zovirax
    adult
    sex
    dating
    bet
    buy-back
    buyback
    exploit
    zoloft
    lommeregner
    propecia
    elbamccormack
    silagra
    loan
    credit
    lisinopril
    dtwhistle

    Authors

    JulianRem
    Stevebooge
    Patricktaday
    Randylaf
    Toimilt
    Haroldsnoth
    EdgarDer
    DavidBlund
    HectorWax
    HillVob
    FrankPar
    Smittstops
    Richarddic
    JamesVon
    WilliamKiz
    BrandenWhope
    Williambef
    RandyDah
    JasonDen
    Crisblody
    ADgat
    JamesAgedo
    Williamcic
    HansBob
    Georgesotte
    Donalddrers
    Zacharyzet
    DannyCen
    RobertSok
    Jamescop
    ShaneJousa
    WendellBup
    RalphFemia
    Ronaldduh
    Lymnacumn
    Hellyrit
    Grantamody
    PrestonGok
    CraigWaw
    DamonMup
    Brandontwive
    Jackiehes
    Quinntawn
    CorryAtolf
    Josephcah
    MichaelSaR
    Davidcap
    MichaelBug
    Brianpautt
    Davidfet
    CharlesKaf
    RobertPer
    aysnzl
    Michaelsoicy
    Charlesnex
    Janjaw
    SirVob
    TornMuh
    Rpbwqk
    Rwptvm
    JuliusBUS
    sildenafil
    loobsesy
    Danielfix
    RobertNig
    JustinBob
    CarlosTetty
    GeorgeJew
    Richardjag
    GeraldHok
    LouisHaump
    avodart4us
    Segtxp
    Matthewnit
    Laweff
    TeddieMiEr
    lerford
    MarrileeMiEr
    HestiaMiEr
    MiEr
    PhillipGox
    Robertranda
    Ngan
    jasa
    aspal
    murah

    Links

    darktormarketslinks.link
    cannabisoilhemp.com
    darknetwebmarket.com
    darkwebonionmarketplace.link
    darknetwebmarkets.shop
    darknetsitelinks.link
    alphabaymarket-onion.com
    darkweb-tor-markets.link
    deep-drugstore-online.com
    ddarknetmarketonion.com
    darknettormarketslink.link
    darknettormarkt.shop
    darkwebmarketcc.shop
    darkweb-darknet.com
    darknetwebmarket.shop
    darkwebdrugstore.shop
    darkwebtormarketslinks.shop
    deep-drugstore-online.link
    drdarknetmarket.com
    alphabaymarketurls.com
    darktormarketslinks.shop
    darkwebdarknet.com
    darkweb-darknet-markets.link
    darknetwebmarkets.link
    darkwebdarknet.link
    stromectol.homes
    darknetweblists.link
    darkweb-darknet-market.link
    newsfrom0tiaperliapugor45.blogspot.com
    darkwebdarknetmarket.com
    darkwebdarknetmarkets.com
    darkwebmarketlistik.com
    alphabayonionmarketplace.com
    lanaisverige.com
    darknettormarkt.com
    darkwebmarketcc.link
    darkwebtormarketslinks.com
    darkwebsmarketss.com
    alphabay-dark-market.com
    drdarknetmarkets.com
    darknetonlinemarkets.shop
    darksitemarkets.link
    darkwebmarketlinkxx.link
    dapoxetinedon.com
    alphabaymarketlinktor.com
    darkwebonionmarketplace.com
    darknettormarketslink.com
    darkweb-onion-markets.shop
    darknettormarketslinks.com
    gncoza.com
    newshunts24.com
    darkwebtormarketslink.link
    simpleviagraed.com
    darkweb-darknet.link
    ganmali2.tk
    darkweb-onion-markets.link
    jncozjf.com
    driends.com
    alphabayshop.com
    darkwebdarknetmarkets.shop
    prednisoneall.top
    darkwebsmarketss.shop
    avodart4us.top
    druglink-darknet.com
    gpcephalexin.com
    justcarepro.com
    gntopama.com
    writingadissertationproposal.com
    bangladeshsociology.org
    vapoursdaily7.com
    mooc.elte.hu
    stephansen-whitley.technetbloggers.de
    devotionmov.com
    bigstring.com
    saugxxx.com
    care2.com
    almaata.ac.id
    bigstring.com
    eatinydbl.xyz
    essayerudite.com
    alphabetadaycare.com
    hdfootball66.com
    mcpcounseling.com
    almaata.ac.id
    decisiontoleavemov.us
    lskfdjsdlkfj.net
    tasteof702.com
    bit.ly
    wifidb.science
    espertoprestashop.it
    preyforthedevilmov.us
    g5pm327zjplh50v5msq6p6800508efi7s.org
    gt19o9wh8q97qm9d8jtr29w019hyk216s.org
    pvp777.xyz
    diagold.xyz
    hairdryerfair.com
    totopolice.net
    teknokrat.ac.id
    bifora65.com
    Ohart.wiki
    bet88indo.net
    dirtyspass.de
    teknokrat.ac.id
    dollargeneral.com
    reptilerally.com
    matkinhphamgia.com
    karpela.info
    controlc.com
    ufaslotpg.co
    informer.com
    garudacopytrade.com
    tavern-tour.com
    fmgirl.com
    rozblog.com
    spiritedmov.com
    nabytokquadro.sk
    e-sezon.pl
    meumtc.com
    wiklundkurucuk.com
    easyfie.com
    goo.su
    tbkorea.co.kr
    budtrader.com
    dreamwidth.org
    themenumov.com
    hitechnewsnow.com
    zoloft2all.top
    hansungit.co.kr
    postheaven.net
    propecia4us.top
    giize.com
    openlearning.com
    https://t.me
    silagra4us.top
    mamikagiftfloristballoon.com
    myemotion.faith
    instapaper.com
    backforgood.faith
    levaquin4us.top
    content-spinning.fr
    zalicz.net
    federatedjournals.com
    gallerygame.org
    flexmon.xyz
    abilify4all.top
    lisinopril2022.top
    8dou.co.kr
    urkarl.ru
    evo-tip.com
    binaryoptionsreview.site

    IP Addresses

    5.39.5.14
    5.62.58.11
    5.62.62.30
    5.157.14.7
    5.183.60.198
    5.183.130.245
    14.38.87.35
    23.81.228.105
    23.82.28.101
    23.82.29
    23.82.29.35
    23.82.29.55
    23.82.29.170
    23.82.29.205
    23.82.29.226
    23.82.28.97
    23.83.179
    23.83.179.32
    23.83.179.31
    23.83.179.218
    23.104.161.151
    23.108.86.216
    23.108.233
    23.108.233.66
    23.108.233.126
    23.108.233.230
    23.229.59.163
    23.231.14.62
    23.231.36.24
    23.250.55.174
    27.71.120.148
    31.134.187.53
    37.115.208.243
    37.139.53
    37.139.53.9
    37.139.53.33
    37.139.53.40
    37.139.53.50
    42.96.33.2
    45.8.134.194
    45.57.144.219
    45.57.168.137
    45.57.225.111
    45.66.208.215
    45.86.0.115
    45.128.247.117
    45.131.3.57
    45.144.176.244
    45.146.26.56
    45.148.233.168
    45.148.234.47
    45.151.253.67
    45.152.208.182
    45.158.45.127
    45.158.187.159
    45.224.229.19
    46.8.21.62
    46.8.107.2
    46.17.45.102
    46.138.162.13
    46.161.11.4
    51.255.3.103
    62.210.127.188
    65.109.27.126
    65.108.140.141
    65.109.27.126
    78.190.147.185
    79.40.195.212
    79.178.161.123
    80.85.141.229
    82.135.87.30
    84.21.188.32
    85.239.44.98
    87.249.133.69
    88.99.209.71
    88.206.79.89
    88.206.120.250
    91.107.126.208
    91.210.248.249
    91.230.225.96
    91.246.193.228
    93.190.178.247
    94.130.18.223
    94.130.212.213
    94.130.222.106
    94.158.22.65
    94.158.190.229
    95.55.250.238
    95.161.223.81
    95.181.153.123
    95.214.55.165
    103.11.25.163
    103.81.93.25
    103.115.176.129
    103.139.48.214
    103.156.219.129
    104.144.129.114
    104.144.145.135
    104.144.155.136
    104.149.159.224
    104.144.224.36
    104.227.100.84
    107.152.197.36
    107.152.247.145
    107.158.118.68
    107.172.42.89
    107.172.68.88
    107.172.68.101
    107.172.181.68
    107.172.181.21
    107.172.181.94
    107.172.35.25
    107.172.68.101
    107.172.69.12
    107.172.132.223
    107.174.149.214
    107.174.249.91
    107.175.68.199
    107.175.74.152
    107.175.119.117
    107.175.235.82
    107.181.154.160
    109.69.109.189
    109.107.182.52
    109.248.59.32
    109.248.129.47
    109.248.204.78
    109.248.205.100
    109.248.204.78
    113.61.48.75
    113.72.121.169
    114.43.87.22
    116.110.33.173
    116.115.100.21
    123.110.186.97
    124.122.27.34
    127.0.0.1
    130.117.79.131
    130.117.79.135
    138.128.121.46
    143.244.46.101
    143.244.46.213
    144.168.143.177
    146.19.24.54
    146.70.103
    146.70.103.206
    146.70.103.214
    146.70.123.182
    151.237.179.28
    154.12.140.196
    154.12.141.207
    154.16.4.146
    154.21.110.90
    154.38.35.202
    154.85.103.151
    154.85.125.221
    156.238.9.109
    161.123.151.228
    161.123.215.121
    162.250.120.10
    163.172.105.76
    165.231.45.23
    165.231.168.96
    168.151.229.77
    168.181.228.3
    170.83.176.180
    170.244.93.190
    172.245.87.97
    173.234.154.186
    176.32.32.97
    176.124.214.186
    178.20.28.112
    178.49.154.60
    178.158.17.131
    178.159.37.60
    178.159.37.142
    178.159.37.4
    178.239.175.226
    179.61.248.14
    181.177.87.173
    183.253.243.110
    185.22.154.29
    185.117.118.252
    185.173.37.75
    185.174.159.245
    185.181.247.178
    185.193.49.2
    185.213.155.168
    185.224.129.49
    186.65.124.139
    186.84.88.134
    186.179.22.63
    186.179.58.83
    188.130.220
    188.130.220.5
    188.130.220.17
    191.102.165.24
    192.3.142.104
    192.162.165.22
    193.169.255.43
    192.198.126.111
    193.150.70.1
    193.150.70.112
    193.150.70.245
    193.218.190.78
    193.218.190.164
    195.3.221
    195.3.221.80
    195.3.221.81
    195.3.221.94
    195.3.221.95
    195.3.221.96
    195.3.221.97
    195.3.221.98
    195.3.221.100
    195.3.221.152
    195.3.221.153
    195.3.221.154
    195.3.221.155
    195.3.221.156
    195.3.221.157
    195.3.221.158
    195.3.221.159
    195.3.221.160
    195.3.221.161
    195.154.61.146
    196.240.254.157
    196.245.153.149
    196.245.248.117
    198.46.169.100
    198.46.176.57
    198.105.108.227
    205.234.203.27
    207.180.247.214
    207.244.117.221
    212.60.22.214
    212.90.39.68
    217.107.125.196
    223.206.229.244
    2400:8904::f03c:93ff:febd:a0c8
    2402:800:62db:187b:b8fa:f200:d772:a3fa
    2a0b:483:2908:d8cb:d4b4:9fe8:d8d3:fda

    E-mail TLDs and addresses

    annabisoilweb.com
    cbdoilwow.com
    cannabisoilhemp.com
    oliviaclara3120@gmail.com
    tawn@gmail.com
    olmdkq@yahoo.com
    t-online.de
    5.twowebmail.top
    mail.com
    onemail.host
    arcor.de
    freenet.de
    fastimap.com
    gawab.com
    throw.swegu.com
    high.jinmydarling.com
    web.de
    zoho.com
    melvamckeown@bigstring.com
    rich_fatnowna@yahoo.com
    estelleolson@the-quickest.com
    ayw.relieval.com
    snail-mail.net
    mailandftp.com
    mailnew.com
    fastemailer.com
    fastmail.in
    mail-central.com
    ictocil@outlook.com
    bk.ru
    gmx.net
    gmx.de
    inbox.com
    mailmenot.io
    sudeu.com
    food.sudeu.com
    verywd.com
    side.verywd.com
    internetmailing.net
  • SSH to Siteground on Windows

    Step 1: Creating the key

    Create your SSH key in the Siteground panel. Give it a password and set a name for it. You can use the tutorial here: https://www.siteground.com/kb/access-site-ssh-connection/

    You will need the ssh-add command which comes with the OpenSSH Authentication Agent Properties. To enable the agent, you need to open up the Services app (click on start and type Services for Windows 10+) then scroll through the list and make sure the OpenSSH Authentication Agent Properties is enabled.

    After enabling it, you will be able to use ssh-add.

    More information here: https://stackoverflow.com/questions/18683092/how-to-run-ssh-add-on-windows

    Step 2: Connecting

    To connect you will still need to have the OpenSSH Authentication Agent Properties enabled. After that, you can use the following syntax to connect:

    ssh user@host -p port number / ssh test@host.com -p 1234

    Usually, if everything is correct you are not prompted for a password, but if you are, you will need to provide the password that you added to the key when creating it.

    Needless to say, the connection needs to be done through CMD or Windows PowerShell

  • Fix XAMPP MySQL server shutdown unexpectedly

    IMPORTANT: do NOT delete ibdata1 file. You could destroy all your databases.

    Instead, first try using the MySQL backup folder which is included with XAMPP. So do next steps:

    1. Rename folder mysql/data to mysql/data_old
    2. Make a copy of mysql/backup folder and name it as mysql/data
    3. Copy all your database folders from mysql/data_old into mysql/data (except mysql, performance_schema, and phpmyadmin folders)
    4. Copy mysql/data_old/ibdata1 file into mysql/data folder
    5. Start MySQL from XAMPP control panel

    Source: https://stackoverflow.com/questions/18022809/how-to-solve-error-mysql-shutdown-unexpectedly

  • Configure LAMP on Ubuntu

    A very good tutorial can be found here: https://chabolla.dev/wamp-lamp-stack-install-on-windows/ and another one here: https://www.how2shout.com/how-to/how-to-install-apache-mysql-php-phpmyadmin-on-windows-10-wsl.html – don’t try them both at the same time, rather take them one at a time.

    However, if after following it, for some reason, mysql or phpmyadmin does not work, try one of the following fixes

    Very useful stuff

    1. If, for some reason you get the following error: Phpmyadmin. mysqli_real_connect(): (HY000/2002): Permission denied. Connection for controluser as defined in your configuration failed – try to use the following fix:

    In the file /etc/phpmyadmin/config-db.php, change

    $dbserver=’localhost’;
    to
    $dbserver=’127.0.0.1′;

    Afterwards, restart Apache2

    Source

    2. To delete Linux apps from the command line, use the following commands:

    sudo apt-get remove --purge mysql*
    sudo apt-get autoremove
    sudo apt-get autoclean

    you can replace mysql* with any other app name such as php* or phpmyadmin* or apache*. You can also use multiple apps like so:

    sudo apt-get remove --purge mysql* php* phpmyadmin* apache*

    3. Reconfigure phpmyadmin post-install

    sudo dpkg-reconfigure phpmyadmin

    4. MySQL won’t start – error: su: warning: cannot change directory to /nonexistent: No such file or directory

    mysql user is looking for a home directory, which seems to have not been assigned. To do that, you can execute:

    sudo systemctl stop mysql.service
    sudo usermod -d /var/lib/mysql/ mysql
    sudo systemctl start mysql.service

    or

    sudo service mysql stop
    sudo usermod -d /var/lib/mysql/ mysql
    sudo service mysql start

    Source

    5. ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

    Try to remove and reinstall all the apps

    5. Create Virtual Hosts

    Very useful article here: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04-quickstart

    I still wasn’t able to add a virtual host outside the /var/www folder, but I should be able to do it in the future.