Articles of linux

Flatten media files in uploads directory via linux terminal eliminating thumbnails?

I need to get the source files (the initial files I have uploaded) of my media library flattening the directory structure and getting rid of the smaller images created by wordpress using linux/mac terminal. uploads/2017/12/some-image-150×150.jpg uploads/2017/12/some-image-360×240.jpg uploads/2017/12/some-image-720×900.jpg uploads/2017/12/some-image.jpg to this: uploads/some-image.jpg

Rewrite URL to remap WordPress Permalink

I’m moving my WordPress site to a new host, and in the process I want to make a one time change to the Permalinks. I want to rewrite the URLs from /2015/11/sample-post/ to /sample-post/ but how can I accomplish that?

Right permissions to WordPress directory

Knowing that not all files and folders have the same permissions, What are the right permissions in order to avoid hacker attacks and to allow the sites updates and upgrades? My site is installed on Linux Debian 7 Note. My mother language is Spanish, so I apologize if my question is not fully understood.

wp-admin/index.php gives a “500 Internal Server Error

experts, UPDATE: hello dear experts UPDATE. many many thanks for the great ideas and tipps. overwhelming – really your are overwhelming!!! i have done as adviced and this method made it clear. i created a folder which i called plugins-deactivated… into this folder i copied / or let me say moved all the modules a […]

WP-CLI sudden empty response

I set up WP-CLI on a new server this past Monday, which worked as expected and scripts I’ve made worked following with no issue. Yesterday, running the same script gave errors: PHP Warning: array_slice() expects parameter 1 to be array, null given in phar:///usr/local/bin/wp/php/WP_CLI/Runner.php on line 610 PHP Warning: Invalid argument supplied for foreach() in […]

Using wp-uploads instead of wp-content/uploads

What is the difference between the wp-uploads directory and the wp-content/uploads directory? I am running Ubuntu Server 12.04 and recently installed WordPress using apt-get, but there have been a few problems. Most of the install went into /usr/share/wordpress including a wp-content directory, but inside that, there is no upload directory. Instead, in /srv/www there is […]

WordPress package configuration in Ubuntu Server?

So I wanted to play with some Linux-only PHP performance tools and installed Ubuntu Server 10.10 in VirtualBox (for the record I have little clue about Linux, never used it extensively). Turned out Ubuntu (Debian) has WordPress package that does some things differently then I am used to. I was especially puzzled with this instead […]

Why is group ownership with rwx permissions not enough?

Running PHP 5.4 and Apache2 on Debian 7, with apache configured to use user www-data. I’m trying to figure out why WordPress cannot modify files in its directory when it has group ownership with full permissions, and seems to only work if it has user ownership. Allow me to illustrate : Case 1 Set User […]

security+best practices: root or www-data on a wordpress content folder?

drwxr-xr-x 8 www-data www-data drwxr-xr-x 6 www-data www-data -rw-r–r– 1 www-data www-data -rw-r–r– 1 www-data www-data -rw-r–r– 1 www-data www-data drwxr-xr-x 7 www-data www-data drwxr-xr-x 7 root root This is on a wordpress install on an AWS linux server and that “root” owned folder is where all my changes go. To write my changes to […]

How to configure WP filesystem access in Linux (Ubuntu Server)?

Ubuntu Server, LAMP stack, freshly self-installed WordPress. Apparently I can’t use direct filesystem access method because files are owned by different owners (WP core unpacked by me and files WP creates by www-data). I tried my credentials for ftp method, but either something goes wrong or there is simply no FTP server installed in stack. […]