[SOLVED]xampp localhost wordpress permissions

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
marcia
Level 3
Level 3
Posts: 118
Joined: Sat Oct 27, 2007 3:34 pm

[SOLVED]xampp localhost wordpress permissions

Post by marcia » Sat Nov 10, 2018 6:11 pm

Dear All,

I am not a newbie to linux but now I am learning wordpress and I am certainly a newbie with this. What is stumping me are the
correct permissions. I have wordpress installed in lampp/xampp and have it working in firefox as localhost. The problem
is when I am in the dashboard and try to upload images I get this error message:" Unable to create directory wp-content/uploads/2018/11. Is its parent directory writable by the server? " I have been reading everything I can about wordpress and or server permissions and ownership. My lampp/xampp wordpress is intalled in /opt/lampp/htdocs/wordpress/. I have my images that I wish to upload in /opt/lampp/htdocs/wordpress/wp-content/uploads/.
I have followed some directions already for permissions but I do not know what I am doing enough since I still cannot upload the images. I only wish to keep the images in that folder and upload from that folder. I do not wish to use my home folder for this.

Machine info:
inxi -Fxd
System: Host: xxxx Kernel: 4.4.0-119-lowlatency x86_64 (64 bit gcc: 5.4.0)
Desktop: Xfce 4.12.3 (Gtk 2.24.28) Distro: Linux Mint 18.3 Sylvia
Machine: System: Gigabyte product: N/A
Mobo: AMD model: 990FXA-UD3 v: x.x
Bios: American Megatrends v: FA date: 10/23/2012
CPU: Quad core AMD FX-4300 (-MCP-) cache: 8192 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 30537
clock speeds: max: 3800 MHz 1: 2600 MHz 2: 2600 MHz 3: 2600 MHz
4: 2600 MHz
Graphics: Card: NVIDIA GF116 [GeForce GTX 550 Ti] bus-ID: 01:00.0
Display Server: X.Org 1.18.4 driver: nvidia
Resolution: 1920x1080@60.00hz
GLX Renderer: GeForce GTX 550 Ti/PCIe/SSE2
GLX Version: 4.5.0 NVIDIA 384.130 Direct Rendering: Yes
Audio: Card-1 NVIDIA GF116 High Definition Audio Controller
driver: snd_hda_intel bus-ID: 01:00.1
Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
driver: snd_hda_intel bus-ID: 00:14.2
Sound: Advanced Linux Sound Architecture v: k4.4.0-119-lowlatency
Network: Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
driver: r8169 v: 2.3LK-NAPI port: b000 bus-ID: 05:00.0
IF: enp5s0 state: up speed: 1000 Mbps duplex: full
mac: 94:de:80:27:4a:a9
Drives: HDD Total Size: 6001.2GB (14.9% used)
ID-1: /dev/sda model: TOSHIBA_HDWE140 size: 4000.8GB
ID-2: /dev/sdb model: ST2000DM001 size: 2000.4GB
Optical: /dev/sr0 model: ASUS DRW-24B1ST c
rev: 1.05 dev-links: cdrom,cdrw,dvd,dvdrw
Features: speed: 48x multisession: yes
audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition: ID-1: / size: 3.6T used: 820G (24%) fs: ext4 dev: /dev/sda2
ID-2: swap-1 size: 17.15GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 28.1C mobo: N/A gpu: 0.0:41C
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 326 Uptime: 8:16 Memory: 2991.1/16079.8MB
Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35

Any help will be greatly appreciated. Thank you.

Marcia
Last edited by marcia on Sun Nov 11, 2018 5:42 pm, edited 1 time in total.

User avatar
PhilippeH
Level 1
Level 1
Posts: 26
Joined: Thu Jul 20, 2017 3:12 am
Location: Toulon (France)
Contact:

Re: xampp localhost wordpress permissions

Post by PhilippeH » Sun Nov 11, 2018 7:48 am

I solved this type of problems by

1) giving ownership of /opt/lampp/htdocs folder and files to current user and group
2) running xampp's apache httpd process under currrent user account

See explanations and simple code here.

I run this way plenty of local CMSs or frameworks, including WordPress, and it allows simple adding and editing of files for you and the webserver. Obviously this is safe only for local development

marcia
Level 3
Level 3
Posts: 118
Joined: Sat Oct 27, 2007 3:34 pm

Re: xampp localhost wordpress permissions

Post by marcia » Sun Nov 11, 2018 11:19 am

Hi PhillipeH,

Thank you very much for the prompt and great help. That is one set of instructions I did not come across before. It looks like it is
exactly what I was looking for. I so appreciate this, thank you again. Will let you know if this works for me.

Many Blessings,

Marcia

marcia
Level 3
Level 3
Posts: 118
Joined: Sat Oct 27, 2007 3:34 pm

Re: xampp localhost wordpress permissions

Post by marcia » Sun Nov 11, 2018 5:38 pm

Hi PhillipeH,

That link worked great for me. I have been struggling with permissions for over 2 weeks and that fix
was exactly the one I needed. Thank you so much.

Sincerely,

Marcia

User avatar
PhilippeH
Level 1
Level 1
Posts: 26
Joined: Thu Jul 20, 2017 3:12 am
Location: Toulon (France)
Contact:

Re: [SOLVED]xampp localhost wordpress permissions

Post by PhilippeH » Mon Nov 12, 2018 6:22 am

I am glad it helped you :)

Post Reply

Return to “Software & Applications”