Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [filesystem]

The tag has no usage guidance.

0
votes
1answer
19 views

Should I store critical css in the database or in my theme's filesystem?

I have a method for detecting a post's critical css when the page is requested and in-lining it to optimize page speed. I would like to cache this css to avoid having to compile it for every page ...
1
vote
0answers
13 views

accessing files in custom folder in wordpress

after uploading files in a custom folder "myuploads" using PHP code, I want to show these files in admin. This folder resides in the root directory along with wp-admin,wp-content,wp-includes folder. I ...
0
votes
0answers
19 views

Moving large files between WordPress installs

What method would be most compatible for most WordPress installs, to transfer a large file [up to 100GB] between one WordPress install [client] to another [host]. Assume total control over [host] but [...
0
votes
0answers
22 views

403 Error on “/”

I am working on deploying wordpress on my personal server just to learn a little bit more about it. I have made it all the way to the admin page but when I try to customize a theme I get a 403 error ...
0
votes
1answer
40 views

What files are safe to delete after a security breach in WP content folder?

My site has been hacked and I want to start with a clean slate, but when I delete some of the folders, the site stops working. So how do I know what I can delete safely or not? Here is the list of ...
1
vote
1answer
33 views

How do I edit the php/html for a particular post?

I am new to Wordpress but I am comfortable coding in html/php and want to create custom forms on some of my posts. My site is currently running on localhost. I feel very silly because I have been ...
1
vote
0answers
30 views

How to block access to files without modifying .htaccess or ngnix config? [closed]

I'm trying to prevent access to readme.txt files on a WP site. Normally, this would be easy by just modifying the .htaccess file or the ngnix configuration. However, the host runs ngnix, which ...
0
votes
1answer
955 views

Installation failed: Could not create directory - CentOS 7

I have spent over 6 hours trying to do the 5-minute installation. I've searched Google over and over, and have yet to find anything that will actually fix my problem, so hopefully someone here can be ...
1
vote
3answers
1k views

Relative file paths in CSS when linking directly (not enqueuing)

I am creating a single-page child theme, in which (apologies to the Wordpress community) I am basically trying to stay out of using PHP or the Wordpress API as much as possible, because I really just ...
2
votes
2answers
1k views

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

Look for a file in a theme before loading from plugin

I am developing a plugin and I would like users to be able to override specific files from their theme. For example: I am including the file people.php, located in: /plugins/my_plugin/view/people....
0
votes
0answers
73 views

How to handle a lot of media files in the uploads folder? (+10.000)

I recently found out that FileZilla only displays 9998 files in a single folder, but our WordPress Media archive has over 58.000 pictures in three folders. So the standard sorting option by date (...
1
vote
1answer
25 views

Adding Adobe files to a wordpress site [closed]

I need to give members access to Adobe files, Illustrator, InDesign, and Photoshop on my website. Is there a plugin or someway I can put those on my site for people to access and download?
2
votes
1answer
68 views

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

Why is server preventing admin styles? (Was: Where are WordPress sessions saved?)

[Note: I'm keeping the following opening paragraph here for posterity, but this is no longer a session issue - something wrong on the server is preventing CSS from displaying.] I asked this question ...
0
votes
1answer
57 views

Get names and paths from unzip_file()

I Need Some help for unzip_file, this code working fine but i want to add extracted files to wp media library, But i don't know how to get unzip files name and path one by one https://codex.wordpress....
0
votes
0answers
14 views

Downloadable content file structure

I have a bunch of files that will be used as downloadable content. Do I have to upload it as media or can I just upload to a folder through FTP? If yes, which folder?
0
votes
1answer
36 views

Creating an .ics calendar subscription service with wordpress

At the moment I just have a static page with a link that when clicked will download all the events I have on my .ics file to a phone's calendar. Ideally what I would like is for people to be able to ...
0
votes
1answer
565 views

How to include all files within a folder & its sub folders to functions.php?

I try to include multiple php files under one category inside my Wordpress theme and the file/directory structure look like this: -Theme Folder --Functions_Folder ---Folder_1 ----File1.php ----...
0
votes
3answers
40 views

Is it better to store images and other files in the root directory or the theme directory

I'm wondering what the best practice is for storing images, css, js etc in my file manager. I've come up with these 2 possible options as my preferred options. Create folders (images/, css/, js/) in ...
0
votes
1answer
72 views

Removing the references to the wp-content folder

I downloaded an HTML template and did the necessary conversions to create a wordpress theme. The location of the template files is in /wp-content/themes. When I look at my template and I go to my ...
1
vote
0answers
59 views

How to know which ajax file or function is called for action

I want to know which ajax file or function is called for action. For example, if i enter some keyword in filtering, it performs some ajax action. When i searched for ajax file chrome developer tools ...
5
votes
4answers
6k views

How to give image source in wordpress page editor?

I have image file stored inside theme directory called site. Now in my home page using wordpress page editor I have put the following code but it didn't display image, seems location is wrong. <...
0
votes
1answer
59 views

How to Call Function From Separate WordPress Install on Same Server?

Is there a way to call functions from a default location for multiple installed sites on the same server? For example: \public_html\functions\global_functions.php has the shared functions for all ...
0
votes
1answer
321 views

Right way to download file from source to destination

I'm trying to download a file from one location to another. The code is working perfect. Here is the code snippet: Helper Function - Create directory in /uploads/{$dir_name}/ and return paths. /** *...
0
votes
0answers
20 views

File management functionality in dashboard

I want to achieve file management functionality(navigating from Wordpress root folder to any of the sub folders like wp-content, wp-includes etc.) in my dashboard without using a plugin - only by ...
-1
votes
1answer
132 views

Plugin installation works only with FTP - how to debug?

When I install new plugins in the Admin, Wordpress asks for FTP access although the file permissions should be correct. I want to enable plugin installation without ftp access. How should I debug ...
1
vote
1answer
2k views

Files automatically added

Today I was warned by iTheme Security that were added 2 files: wp -content / uploads / GeoIP.dat wp / content / uploads / GeoIPv6.dat Where did these come from and what is their purpose?
0
votes
2answers
1k views

WordPress HTTP Error on File upload

I have increased the max_file_upload_size from 20 MB to 100 MB in WordPress, but I've been facing a problem since then. Whenever I try to upload a file of any type, it says "HTTP Error" when I use ...
2
votes
4answers
8k views

How to convert the file path to a URL of the same file?

How do I convert file system path to URL? I have found some general PHP solutions that can be error prone. Is there some WordPress specific way to do it?
0
votes
1answer
223 views

get_template_directory() returns wrong address on VPS

I'm having the following problem with a Wordpress installation on a VPS server. I'm trying to read from a JSON file but the returned address from get_template_directory() is wrong: $url = ...
0
votes
0answers
659 views

Can't Install WordPress (local) Failed to open file wp-includes/wp-db.php

Title kinda says it all. Trying to install WP locally and I get the following error when trying to use the wp-config.php generator UI: Warning: mysqli_real_connect(): (HY000/2002): No such file or ...
0
votes
1answer
227 views

Cleaning a filename after image sideloading a url that contains `%20`

Right now I'm creating a plugin to sideload images from an external source. The UI allows me to select files on the external server then downloads them via AJAX & media_sideload_image. ...
0
votes
1answer
466 views

FS method direct on NGINX

WordPress is a great CMS but when it comes to debugging and error reporting it becomes pretty annoying. I've been searching a solution for my problem for quiet a while now. Unfortunately without any ...
0
votes
1answer
496 views

Correct file permissions for in-browser updates using WP-CLI

I installed WP using WP-CLI (i.e. on the command line on the remote server). I'd like to give another person the ability to change the theme, plugins, etc. using the standard WP admin browser ...
0
votes
1answer
834 views

Avoid 'uploads' 777 permissions: Potential threat or clean solution?

Recently changed hosting of a website and found the upload directory of WordPress wasn't "available". I have been reading that setting folder permissions to 777 would allow everything to work fine, ...
0
votes
1answer
134 views

Should I use Filesystem API for reading files or listing directories?

I know that i should use Filesystem API to write files and I understand why but is there any difference if I read file with wp_filesystem or plain PHP? And what about listing directories? Consider ...
0
votes
1answer
216 views

Running rmdir function on post save

How can I make wordpress call this function when a post is saved? $folder = "/temp/files/"; //path of the folder to be removed function delFolder($folder) { foreach(glob($folder . '/*') as $...
0
votes
1answer
518 views

Generating and downloading files with WP API

Lately I was challenged to implement functionality that would allow users, editing specific custom post, to download json file based on meta of that post. I finally managed to complete the task (well, ...
0
votes
0answers
285 views

Using external file with WP_USE_THEMES set to false causing 404

I have a file in my template I want to use for a Twitter authentication callback named oauth.php that I'd like to be accessible through htp://mydomain.com/oauth.php: <?php define('WP_USE_THEMES', ...
1
vote
1answer
943 views

Necessary user, group and permissions for core updates

What user, group and permissions of files and folders I need for core updates? Test setups I tried everything the manual recommended me to. Here are some test setups I used, the setup was ...
0
votes
1answer
384 views

Accessing a file saved outside webroot in a wordpress post

I have some files saved outside the webroot and need to allow posts in WordPress to be able to access the files. Following is the location of one of the files: /home1/Mathone/TESTS/Test1/index1....
0
votes
1answer
60 views

Page to show a link to every file in an directory

I have a file on my server with a large number of PDF files in it (more than 100) and I wish to have a page on WordPress that shows a link to each of these files (say sorted alphabetically by the name ...
0
votes
1answer
278 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 fully....
0
votes
1answer
98 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
181 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: site....
3
votes
1answer
779 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 = ...
2
votes
1answer
42 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
52 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
71 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 ...