So after the successful second installation of VestaCP decided it was time to test an add on domain. I was wondering whether there would be any challenges with DNS. I was blown away by how easy and smooth all of it went. Part of it may be that VPS 27 is a very fast VPS. And VestaCP is also a lightweight fast panel. I’d purchased one of those cheap domains at Namecheap earlier in the day. Then added my frihouse.net name servers to it. It was very easy to add on a domain in VestaCP, only thing to make sure in the DNS setup is to set it on a child template. Not the default template.
I then experimented with copying the WordPress Website on frihouse.net to the add on domain. I first created an empty database. Then uploaded the frihouse.net database to the new database in phpmyadmin. That went super fast. Then used FileZilla to SFTP a fresh installation of WordPress to the new add on domain. Also added the plugins, themes and uploaded artwork to the new installation in the add on domain. All that was left to do was to sort out the domain information in the database and config.php of WordPress, and it worked perfect. One final tweak was to give permission to the new add on domain to own the public_html of the new add on domain. Totally blew me away how fast all of that went. Like under 20 minutes.
So last night spent hours trying to figure out why WordPress asks for FTP details when I want to load plugins or delete themes. My searches first took me to WordPress.org where I worked through a large number of posts. The suggestion that looked like a good one was to force the issue with the following addition to the wp-config.php:
Initially that made me happy as on the face of it it looked as though it was working. There was no request for FTP details, and when I attempted to delete a theme, it said it was “successfully” deleted, except the theme was still there. When I tried to reinstall WordPress it attempted to install and looked as though it was doing something until it was obvious it wasn’t. WordPress Codex suggested by way of an alternative that “direct” could be replaced with “ssh2” or “ftpext” or “ftpsockets” in that order, however that didn’t work either. WP reverted back to asking for FTP details again.
Next I navigated to the VestaPanel Community Forum and soon realized that the problem was unique to VestaPanel users – there were a good number of posts discussing the issue. I was finally able to grasp that the owner of my WordPress installation was ROOT and not ADMIN and that was the reason WordPress was asking for FTP details. When I had installed my VestaCP I had made a decision not to install an FTP server and to use SFTP . Which in essence meant that ROOT and not ADMIN was the owner of my WordPress installation. WordPress was looking for ROOT and since ADMIN didn’t have user privileges it asked for FTP details. So found the following commands that I will be trying out tonight when I get home:
chown admin -R *
Cross fingers it will work out. If it does, then this is an important lesson for those with VestaPanel who elect to use SFTP instead of installing an FTP Server.
Note: It did work! If one doesn’t install an FTP server and one uses SFTP one in effect installs scripts on public_html as ROOT. One has to give ADMIN ownership of public_html otherwise it will have issues such as with WordPress. The WordPress site I created is in perfect shape now. Have to marvel at the speed of the site, especially when I’m working on it. Probably a combo of VestaPanel as well as VPS speed. Am very happy with the outcome!