Securing a multi-user permission structure

I’m currently working on a team that needs two distinct users from the same wpadmin group to be able to modify the wordpress files. Following the guide at Hardening WordPress (Codex), the following commands would give 755 and 644 access to directories and files respectively: find /path/to/my/wordpress/install/ -type d -exec chmod 755 {} \; find … Read more

Change default uploads file using wp Skeleton

I am using WordPress Skeleton (https://github.com/markjaquith/WordPress-Skeleton) which pulls the themes etc out of the wp directory. I am trying to set it up so uploads have a custom url (eg: site.com/custom/url instead of site.com/uploads). var_dump(wp_upload_dir()); Gives me: array ‘path’ > ‘/file/system/path/www/wp/core/assets/2014/08’ ‘url’ > ‘http://site.local:8888/wp/core/assets/2014/08’ ‘subdir’ > ‘/2014/08’ ‘basedir’ > ‘/file/system/path/www/wp/core/assets’ ‘baseurl’ > ‘http://site.local:8888/wp/core/assets’ ‘error’ > … Read more

Can’t write pdf file to upload directory using FPDF

PHP Warning: file_put_contents(http://lendersmatch.ca/wp-content/uploads/deals/deal1.pdf): failed to open stream: HTTP wrapper does not support writeable connections in /home/t21jv08zz60b/public_html/wp-content/plugins/mortgage/fpdf181/fpdf.php on line 1023 [27-Jan-2018 11:24:20 UTC] PHP Fatal error: Uncaught Exception: FPDF error: Unable to create output file: http://lendersmatch.ca/wp-content/uploads/deals/deal1.pdf in My Code: $filename=$upload_path.’deals/deal’.$page->id.’.pdf’; ob_clean(); $pdf->Output(‘F’,$filename); FPDF: if(!file_put_contents($name,$this->buffer)) $this->Error(‘Unable to create output file: ‘.$name); break; 2 Answers 2 $name apparently … Read more

What is the best way to move a plugin´s subdirectory+files to wp-content/uploads-directory?

I am developer of the plugin Leaflet Maps Marker (http://www.mapsmarker.com – “Pin, organize & show your favorite places through OpenStreetMap, OGD Vienna or any custom WMTS-map”) and have one question: the plugin contains about 100 marker icons from Maps Icons Collection (mapicons.nicolasmollet.com) which can be used to mark your favorite places. These icons are stored … Read more

What are the hierarchy of filenames while initialising a WordPress plugin?

WordPress has recommended to have the filename similar to the name of the plugin. There is no other information about the hierarchy of filenames of a WordPress Plugin. Also I don’t find plugins following any rule for naming the file which initialises the WordPress plugin. Most of the plugins use the filename as my-custom-plugin.php. Some … Read more

How do I maintain static directories on multisite subdomains?

I’m trying to migrate from multiple subdomain blogs to WP multisite. The one stumbling block is that I’m pretty sure the static files and directories on my subdomains will not be found; each of my blogs has its own set of static files (downloads, mp3 archives, scripts, etc.). What would be a way to maintain … Read more

How to move WordPress theme files into a subfolder without breaking the theme?

I’ve been coding a WordPress theme using OOP PHP, node.js and Webpack, and between classes, node_modules, configuration files and WordPress template files my theme’s directory has become a bit messy… Is there an easy way to move the theme’s template files to an app subfolder without breaking the theme? (I’ve found a similar question but … Read more

$wp_filesystem returns NULL. What are the dependencies?

I need to obtain a reference to the $wp_filesystem object. In the test below, the var_dump($wp_filesystem) returns NULL. What additional files are required in order to properly set up $wp_filesystem? I was expecting that since its called in file.php, loading that file would be sufficient to load the object. <?php require(‘../../../wp-blog-header.php’); require(‘../../../wp-admin/includes/file.php’); $mytest = somefunction(); … Read more