Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
22 views

Private file system for attachments

Is there a way to make an attachment private? This also includes moving the files to a separate folder for private attachments, even if it's a sub-folder of uploads, to restrict anonymous access ...
-1
votes
1answer
22 views

Does WordPress create a new Linux user when creating a new WordPress blog?

I wonder if WordPress creates a new Linux user when creating a new WordPress blog? I am a NodeJS developer, but from what I know PHP scripts can also have access to entire file system. That's why I ...
2
votes
0answers
76 views

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: ...
3
votes
1answer
77 views

Convenient way to use wp_filesystem

I'd like to use $wp_filesystem which seems to be the recommended way to manipulate file system objects in WordPress but compare this: plain PHP code: mkdir('abc'); WP Filesystem API code: $url = ...
1
vote
1answer
24 views

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 ...
0
votes
0answers
27 views

Folder Permissions + Security Concerns

I messed up bad guys. I while working on another part of my website I accidentally nuked my WordPress folder permissions. I was able to find/fix some problems and I got my site up and running but some ...
1
vote
0answers
32 views

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 ...
0
votes
1answer
37 views

Get original path of user's filesystem of an uploaded media

Is it possible within wordpress to retrieve the original upload path of a media? For example, the user uploaded from C:\pictures\holidays2014\image1.jpg. I want this path, not the created path after ...
0
votes
0answers
69 views

Making a custom upload form and page in the admin section

so I've built this standalone php script which allows my users to upload a CSV which updates JSON data for a feature on our site, but I want to put the script inside of the wordpress admin section for ...
1
vote
2answers
394 views

Running WordPress as FTP user?

I've been doing some research on file permissions as of late, as my WordPress installation on my VPS doesn't have write access. From what I've heard it's very dangerous to make the apache user the ...
0
votes
0answers
41 views

saving file to external server vip

I have a handwritten script that writes a text file locally in one of my Wordpress pages, but now I need it to read and write to a remote server that is password protected and accessible only through ...
0
votes
0answers
27 views

Page Not Found when file does exist

We are having an issue where although files are listed in File Manager they will not pull up when we link to them. We are on the current version of WordPress and all plug-ins. Here is a link to a ...
0
votes
0answers
32 views

Which actions can update/change .php files?

As a followup to my question "How to find out if an wp-admin action edited a file?" I now could use a list of actions and files that can actually cause an update or change to .php-files in a default ...
1
vote
2answers
544 views

Converting fopen/fwrite operations to WP_filesystem

In the function below, I'm trying to convert the fopen/fwrite/fclose methods to the preferred WP_filesystem methods. Everything works as expected using the commented out script block, however, the ...
1
vote
1answer
151 views

Alternative to file_get_contents() for theme operations

My theme options page needs to write to the style.css file in order to store updated theme settings. To do that, I'm using file_get_contents() and file_put_contents() However, theme-check plugin ...
1
vote
1answer
45 views

How to implement filesystem cache in Wordpress

I'm currently using the Transients API to cache some product details from Amazon. Now I'm looking into adding a file system cache. But I have no idea how to implement it. The only thing that I can ...
0
votes
1answer
91 views

Displaying $_FILES data (simlar to $_POST)

I'm trying to display $_FILES in wp-admin, and I've been using add_filter and apply_filter, but it does not seem to show the $_FILES array values. My goal is to show the values in $_FILES so I can ...
1
vote
1answer
72 views

Placing assets for external use

I'm developing a plugin, that is meant to work on external requests to a wordpress site. The plugin will generate a .json file, and will come with 2 default .css style and 1 .css file that will ...
0
votes
1answer
164 views

Why do I get undefined function export_wp()?

I'm trying to create a function in functions.php or a plugin to generate an export via a cronjob, similar to how Chris_O did this question. However it seems that I can't call export_wp(), I keep ...
0
votes
1answer
856 views

How to edit php code in WordPress Post file?

I have a wordpress page. In that wordpress page, user will have access to the following Window to Publish their Post in to the webpage. If the user enters an URL in any of the three filed I have ...
0
votes
1answer
661 views

wp-config.php file permissions

I have installed Wordpress on my local Ubuntu machine, with standard LAMP configuration and phpMyAdmin. The installation directory is localhost:///var/www/blog. At the second step of the ...
1
vote
1answer
459 views

Merging PHP download script into `functions.php`

I run a large mixtape download site on WordPress. I'm currently developing a new theme and I'd like to include as much site functionality into the theme's functions.php. For serving the downloads, I ...
3
votes
2answers
268 views

Is there a WP Way of getting a filehandle?

I'm using an external CSV reading library that takes a filehandle (resource) as an argument. I'm using wp_handle_upload() to actually process and store the file in the Uploads directory, but that ...
5
votes
1answer
72 views

Do WordPress Core Filenames Work as Hooks?

This is in reference to another answer here on wordpress.stackexchange. The answerer used the filename as the hook to enqueue scripts and styles to certain pages. add_action( ...
1
vote
1answer
150 views

Is it bad to store many files in a single folder?

I upload thousands of images and it stored in a single folder. Is it bad if too many images are in a single folder? would that slow down the loading of the image even though you're viewing an ...
1
vote
1answer
533 views

Interface for logged-in users to upload/download files

I am setting up a site for a non-profit that would like to have a 'members' area where certain users can swap files for meetings, events, etc. They essentially need a simple interface where they can ...
0
votes
1answer
136 views

Why does WP load so many files in the head of source code? How do I optimize it?

I have noticed that wordpress loads a bunch of files into the head of a site. This looks really sloppy and discloses vital information about the file structure of a website. Depending how many ...
0
votes
1answer
1k views

Image URLs stopped working due to Permalinks?

I've been changing my Permalinks and changing my site the the "www" version (Which I think has broken my image and video links). All my images are "red x" now, both inside the library and the posts ...
0
votes
2answers
5k views

Moving wp-content outside of web root?

Is it possible to move the entire wp-content folder outside of the Web root? I need to prevent anyone to view any asset file (images, pdfs, movies etc) with a direct url to the file... Any ideas? Or ...
1
vote
2answers
65 views

What permissions should I give directories if I want to make WordPress more secure?

A follow up to a previous question found here How can I lock down an old wordpress install I don't intend to update? Same info still stands. WordPress install will (probably) not be updated. ...
2
votes
1answer
379 views

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 ...
4
votes
1answer
78 views

add/apend templates 'transparently' via plugin to currently active theme or child theme?

Cross posting my trac question here in the slim hopes that someone here has run into the same issue and has already come up with some proof of concept code I can try: In building a custom 'theme ...
0
votes
1answer
358 views

wp_redirect to file:// location results in blank page/cannot be displayed page

I have a CPT that is justed used for linking to resources on a local drive. I have this code in single-resource.php: <?php global $post; the_post(); $location = get_post_meta($post->ID, ...
2
votes
2answers
3k views

delete uploaded file

I have a function wp_handle_upload() for uploads files. $file = $_FILES['attachment_icon-' . $i]; $upload = wp_handle_upload($file, array('test_form' => false)); what is a function for delete a ...
0
votes
2answers
2k views

Standard permissions for wordpress; Plugin installation asks for FTP credentials

I'm on a server that does not have FTP installed and will not have FTP installed. I have another website that I've been able to install plugins in before, including the one I'm trying to install now ...
0
votes
1answer
117 views

No error in debug mode, wordpress template can not be loaded

I am trying to solve this issue for days.. I consumed all options and therefore need some fresh ideas.. I have a page template for posting/editing 2 different custom post types from front end of ...
0
votes
1answer
1k views

How to check if txt file exists inside template folder?

I have a folder inside my theme where I hold some txt files which I am including in a theme. The problem is that before including txt file I need to check if it does exist. I fail checking it the ...
1
vote
1answer
1k views

List of files/folders writable by the web server?

New to WP. I soon realized there are some files that need to be writable by the web server, otherwise various operations fail. Moreover, the lists seem to be different for different tasks. Not sure ...
4
votes
3answers
2k views

Creating directory in uploads - wp_mkdir_p() or WP_Filesystem?

I don't think I ever had practical need to create folders/files in WP before, but for a plugin I need cache (for resized images) folder in wp-content/uploads. Which raises the question - do I really ...
1
vote
2answers
309 views

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 ...
1
vote
1answer
122 views

Where do I save widget code for wordpress?

Pretty simple, I've written a widget and I can't find out for the life of me where to save it?! Using the most recent version of wordpress. Thanks, John.
0
votes
1answer
389 views

Time limited file download upon form submit

The basic of what I need; A public page where the visitor have to fill out a form in order to be able to download a large file (the one and the same file for all downloads/users). The file should ...
6
votes
6answers
2k views

Where to store PHP files created by plugin / themes

There are cases in which a plugin or theme needs to create a php file somewhere that can later include it. For example a captcha plugin, or some kind of a templating system like twig/smarty (In my ...
0
votes
2answers
2k views

Is fopen() forbidden in WP?

I badly need to create an .XML file inside my theme every time user comes to my site. But I can't. This code in header: <?php $ourFileName = "testFile.txt"; $ourFileHandle = ...
0
votes
2answers
740 views

FTP file manager AS wordpress site

Ok, maybe it a far fetch question, and a question about depersonalisation of something into something else, but let try. One on my client want a easy file bin for his client to go get the public HR ...
0
votes
3answers
489 views

Uploading non-media files?

I want to add files on WordPress that are non images, embedded video and the like. However when I try this using the upload media feature I get the following error. "File type does not meet ...
0
votes
1answer
570 views

$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? ...
2
votes
2answers
1k views

sanitize attachment filename

I'm looking for a way to sanitize the filename of user uploaded attachments. I thought that wordpress already did it but I faced preblems after an user uploaded an attachment containing a '°' . That ...
2
votes
1answer
2k views

Uploading Media gives error “Missing a temporary folder.”

After we upgraded to Wordpress 3.0.1 (from Wordpress MU 2.9.2) we began getting an error message whenever we tried to upload media. "Missing a temporary folder" Various articles around the web ...
3
votes
2answers
740 views

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 ...