Followed Linode Instructions, but Wordpress doesn't work.

Hi Guys,

I'm really hoping someone would be kind enough to help me.

First of all, this my first time working with a virtual server environment, I'm used to just using cPanel. That said, I am NOT a tech-newbie, I've worked with computers for centuries and I am a web/graphicdesigner by profession.

So for the past hours I've been playing around with setting my server up.

I followed:

https://www.linode.com/docs/getting-started

https://www.linode.com/docs/security/se … ur-server/">https://www.linode.com/docs/security/securing-your-server/

https://www.linode.com/docs/websites/hosting-a-website/

And to my great surprise, everything works at this point.

Now my goal is to install Wordpress on this server, so I logged in with SFTP, using my new user I setup in chapter two (adduser exampleuser, usermod -a -G sudo exampleuser).

First problem. I don't have permission to upload files in my folder /var/www/mydomain.com/public_html but I figure, ok no big deal, i'll just use the root user for SFTP - and that worked. Great.

So my wordpress installation is ready and I access mydomain.com to see the usual installation-guide for wordpress. I input all the data, my MySQL name, mysql user (I created earlier) and the password for this and I click Next.

Second issue. Apparently Wordpress can't write the wp-config.php so I'm given a code I need to paste in a file manually. At this point I already expect things to continue going bad.

I copy+paste the code and I'm able to move forward in the setup. Finally completing it.

I log into my Wordpress backend and immediately I try uploading a file to the media gallery, as I at this point expect things to go bad, since I had to manually do the config file earlier. Just as I thought.. I don't have permission to upload anything or create the directory for upload.

I manually create the folder "uploads" and from terminal I do this command (found on this forum): chown -R www-data:www-data uploads

And that worked. Now I am able to upload files at least.

Third issue. Then I wanted to upload a theme. But of course, I wasn't able to do that either, for the first time ever in my life: "To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. "..

Frustration occurs and I don't want to deal with this anymore.

What was missing in the Linode instructions that even made the First issue occur in the first place? I would expect that 80+% of Linodes customers run Wordpress, or want to run wordpress. Why isn't there a bulletproof guide? This one seems to have left so much out (because then they can charge $100/hour when people get frustrated of it not working)

Can anyone help here? I can't be the only one. Everybody who had followed the instructions and tried installing WP must have had this issue? What am I doing wrong or forgetting?

Cheers!

  • Nicholas.

1 Reply

Sounds like a simple permissions issue to me. Since the installation of Wordpress is a "web processes" (for lack of a better term) your /var/www/mydomain.com/public_html directory should be owned by the user & group of your "web process" (in your case www-data for Apache).

Using the command line, go to /var/www/mydomain.com and run this command: chown -R www-data:www-data ./public_html
That will give you the ability to write to the Wordpress install via the web. Since you installed it (partially by hand) as 'root' then root "owns" everything and your web process (www-data) doesn't have permission to write to those directories (or overwrite the files owned by root).

Once you get everything set up you should head over to wordpress.org and read up on how to secure your Wordpress site (they are always prime targets).

MSJ

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct