I've recently started using Linux on one of my laptops. I installed XAMPP (LAMPP) which I'm very familiar with on the Mac and Window OS in order to develop my WordPress themes etc.
I keep running into annoying permission issues, which I understand is a part of the Linux learning curve. I'm not proficient using terminal commands.
Before doing anything I could not import my any Wordpress development files from my other computers without having access permission errors.
Using terminal I changed the permissions in the htdocs folder:
sudo chmod 777 -R /opt/lampp/htdocs
Which solved one problem, seemed like my WP files were recognized, but now I cannot connect to the database I created in phpMyAdmin, using the correct database name, root as the user and nothing for the password, which works fine when I create a WordPress installation from within this laptop.
I only get these issues when importing files into htdocs from a zip or otherwise.
Is there a set of best practices for setting up XAMPP (LAMPP) on a Linux box so that there are no permission issues or other issues that get in the way of using a local installation for Wordpress (and other programs).
Thanks!
For best practices refer to the wordpress codex. [1] It is not very wise to assign 777 permissions to your files.
I would usually cd to the directory containing wordpress installation i.e. where wp-content, wp-admin and wp-includes exist. Then run the following commands
To set permissions for directories
find . -type d -exec chmod 755 {} \;
To set permissions for files
find . -type f -exec chmod 644 {} \;
[1]. http://codex.wordpress.org/Hardening_WordPress#File_permissions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With