June 6

WordPress: Unable to see images or upload files

After migrating WordPress to a new server I was unable to see many of the images and the administrator could not upload.

It is import to check the permissions of your newly migrated server.

In my case I was running apache and the user of the owner of the WordPress directory was root and many of my directory/file permission were not correct.

cd /var/www/html/

ls -l
total 4
drwxr-xr-x. 8 root root 4096 Apr 16 15:07 wordpressserver

To correct this issue do the following:

chgrp -R apache /var/www/html/wordpressserver/
chown -R apache /var/www/html/wordpressserver/

chmod 766 uploads -R /var/www/html/wordpressserver/wp-content/uploads

By: Nighthawk


Copyright 2021. All rights reserved.

Posted June 6, 2013 by Timothy Conrad in category "Websites

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B