Guidelines for resolving permissions using XAMPP (LAMPP) on a Linux machine

Problem

I recently started using Linux on one of my laptops. I installed XAMPP (LAMPP), which I really like on Mac and Window OS, to develop WordPress themes, etc.

I continue to run into annoying resolution issues that I understand are part of the Linux learning curve. I do not own terminal commands.

Before doing anything, I was not able to import files from any other Wordpress from other computers without access errors.

Using the terminal, I changed the permissions in the htdocs folder:

sudo chmod 777 -R /opt/lampp/htdocs 

Solving one problem, it seemed to me that my WP files were recognized, but now I can’t connect to the database that I created in phpMyAdmin using the correct database name, root as a user and nothing for the password, which works fine when I create a WordPress installation from this laptop.

I get these problems only when importing files into htdocs from zip or otherwise.

Question

Is there a set of best practices for setting up XAMPP (LAMPP) in a Linux box so that there are no resolution problems or other problems that prevent you from using the local installation for Wordpress (and other programs).

Thanks!

+4
source share
1 answer

For best practice, refer to wordpress codex. [1] It is not very wise to assign 777 permissions to your files.

I would usually write the directory to the directory containing the wordpress installation, that is, 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

0
source

All Articles