After breezing through an easy VestaCP installation including almost instant DNS propagation I was more than ready to install a WordPress site. I first tried to use my Duplicator Migration Installer, was delighted when the Installer.php worked, however everything else in VestaCP failed for the Duplicator Tool. I soon realized that I’d have to copy the WordPress site the difficult way by first creating a database.
Adding a database in VestaCP is dead easy, however the fun started when after the addition the next step took me to PhpMyAdmin that was filled with error messages. That was when I realized I needed some extra help with the configuration of PhpMyAdmin. During my preparation before the install I had happened upon a YouTube tutorial and I used this in detail for setting up my PhpMyAdmin.
First step was to go into PhpMyAdmin as ROOT and I’d completely forgotten what my VestaPanel ROOT password was. Initially I thought it was my VPS ROOT password, but not so. Fortunately I was able to find it at this location:
Then of course bashed my head against the wall a few times as the password had been so obvious.
I was finally as Root in PhpMyAdmin and was able to follow the steps in the cheat sheet that was provided for Configuring PhpMyAdmin:
- Add a new user
- Keep drop boxes in window unticked – no privileges as yet
- Create database with same name but with privileges
- Check “global privileges” and tick all
- Then hit “GO”
- Import create_tables.sql.gz from a zipped folder provided by author
- Log out of PhpMyAdmin
- Edit config.inc.php (from zipped folder) changing name of user and password
- Upload config.inc.php to /etc/phpmyadmin/config.inc.php
- Log into PhpMyAdmin again as root
At this stage PhpMyAdmin was supposed to be error free. Except there were still bugs in it. The three last tables were disabled, and when I Googled it just couldn’t find an answer. Was well and truly stuck until I found a solution by the VestaCP Team, which was the following patch:
wget –no-check-certificate https://raw.githubusercontent.com/skurudo/phpmyadmin-fixer/master/pma-centos.sh && chmod +x pma-centos.sh && ./pma-centos.sh
I was happy to read these words by Skurudo (VestaCP Guru):
adds in a mysql pma user / and the table phpmyadmin (if the user “pma” or the table “phpmyadmin” already exists, the script will delete those!);
It worked! Next I was able to log in as the user of the Database I had created before I had started the PhpMyAdmin configuration (felt like ages before) and to import the WordPress site dbase.sql.