Question

I created/moved vhost directories and now WordPress permissions are screwed up

  • Posted on September 4, 2014
  • booruguruAsked by booruguru

When I check the folders in my WordPress directory, the permissions are defined as they should be, but WordPress/wp-admin is unable to do things like install plugins…instead it prompts me for my FTP credentials.

This all started after I created some vhosts on my server and moved my WordPress site into a new directory within /var/www/? I assume this must have something to do with apache, but I don’t know how to proceed.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This question was answered by @gio.arteaga:

Is the URL the same or different after moving the vhost directories to the new location?

If it is different, than you will need to modify the sql database and make the appropriate changes.

  1. Edit the wordpress site db. Use mysql from the terminal or phpMyAdmin
  2. Edit the database wp_options
  3. Edit the option_name (database column fields) siteurl and home. Se the appropriate url

Also, check the appropriate permissions for files and folders. And depending how Apache was installed, the permissions should be

Files

-rw-r--r--  1 user1 user1 2.9K Sep 24  2013 wp-cron.php
-rw-r--r--  1 user1 user1  246 Jan 25  2014 wp-feed.php

Directories

drwxr-xr-x 12 user1 user1 4.0K May  8 10:45 wp-includes/

Gio

View the original comment