Plesk + WordPress: Homepage loads, but other pages don’t

I’ve only experienced this error when transferring databases from old WordPress installs on to new Plesk WordPress installs. After transferring the database, the homepage loads fine, but the rest of the site links produce a “Page not found” or a 404 error.

This is an easy fix, as you should still be able to reach your WordPress dashboard. Once there, all you have to do is go to Settings > Permalinks and Save without making any changes (technically just loading the page should do the trick).

Check to make sure this has fixed the issue, if not you may need to define you URL’s (something I may cover later).

Plesk: WordPress Permissions

I use WordPress on Plesk to host client sites.

On some of my client WordPress sites I started to run in to an issue when trying to update plugins, install themes, or modify files. The root cause was the permissions issue with WordPress when Plesk installed the application.

If you’re encountering permission errors on a Plesk installation of WordPress you’ll likely see a message like:

Could not create directory

There are two ways you can fix this. The first is the easiest, so I’ve always tried this first but for some installations it just doesn’t seem to get WordPress to play nicely.

First, log in to your Plesk installation via SSH.

ssh user@127.0.0.1

Where “user” is your username, or the root user and “127.0.0.1” is the IP address of your server. If you’re not using SSH keys you’ll be prompted for your password (enter that now if needed).

Next, you’ll want to run the prepackaged command that comes with Plesk and works for versions 11.5, 12, and 12.5.

/usr/local/psa/bin/repair --restore-vhosts-permissions

If you’ve entered this correctly you will see a message confirming that the permission have been reset. Return to WordPress, and try test to make sure it’s working. This will generally solve most issues, if you still get errors when modifying files you can then try manually adjusting the permission for WordPress inside of your Plesk installation.

Transfer back to your command line, or log in via SSH if you’re not still connected.

Now, you’ll need to navigate to your site folder.

cd /var/www/vhosts/your-site-name.com/

Then modify the permissions:

chown -R youruser:psacln httpdocs
chmod -R g+w httpdocs/wp-content
find httpdocs -type d -exec chmod g+s {} \;

Note that “your-site-name.com” and “youruser” must be replaced with the proper variables for your installation. Additionally, “youruser” is the user for this particular WordPress installation and not the SSH user that was used to log in to your Plesk server, though in some cases it may be the same (if you’re hosting for clients, it generally it isn’t).

I’ve still not found out why neither of these commands works 100% of the time, but between the two of them I’ve not been able to “not” solve a WordPress permissions issue using Plesk Onyx.

Hello world!

I’m working on writing more about the work that I do, and the things that excite me. Thanks for following along.

I’ve been working for 3 months creating a new platform for my online business. Hosting Managed WordPress is something I’ve been doing for my web clients for years, but using a third party hosting provider finally became too much.

I’ve used Hostmonster as my client’s hosting provider for years, and over the course of the last two years their team has shown increasing signs of outsourcing and decreased ability to help with high level hosting issues.

Because of this, I’ve been busy setting up and transferring all of my client sites to new infrastructure. Infrastructure that provides me the access to modify and provide security updates, that large hosting providers often overlook. I’m hoping to launch the platform on January 1st, 2017 after the final round of testing.

For now, the beta site is up, and continuously improving. Check it out, SuccessfullySmall. We host Managed WordPress for small businesses. We take out all of the hassles of operating a WordPress installation so our clients are able to better leverage their sites for their marketing endeavors. After the initial launch we’ll be ramping up additional services such as custom design, marketing, and content optimization. We’ll also be creating tutorial videos and sending a monthly email to help clients better understand WordPress and how they can improve their online marketing by leveraging their website.

More to come in January 2017, have an awesome holiday season!