Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [filesystem]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
31 views

WordPress with Bedrock on Pantheon. Is it dangerous to set false on DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS consts?

I have a WordPress project with Bedrock on Pantheon. In the application.php file the DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS consts are true by default. In that case, there are no language options ...
Sergey Gabrielyan's user avatar
1 vote
0 answers
37 views

Best way to handle multiple assetlinks.json URLs for Multisite?

When running PWA/TWA apps built on WordPress, they require an assetlinks.json file to be served from the root domain of each site. I'm wondering if anyone has come up with a solution to this using ...
Jesse Nickles's user avatar
1 vote
0 answers
37 views

Why is Wordpress upgrade process not using WP_TEMP_DIR?

I am setting up a special Wordpress deployment that has all dynamically uploaded and modified files stored in a single location. Wordpress provides constants that allow to modify location of all but ...
Marek Rost's user avatar
0 votes
1 answer
32 views

Media Library Issues

(All plugins disabled) I have some strange issues with the media library. It's an old site that I have been managing for the last 2 years. The site has dated media folders on disk going back to /2010/...
essexboyracer's user avatar
0 votes
0 answers
18 views

Organizing media files (pdf) and searching based on the folders created

I am attempting to find a way to search through sorted PDF files inside the media section of WP. My goal is to be able to set up different search engines within my site that pull from specified ...
M. Dave's user avatar
0 votes
0 answers
18 views

Condionally/limited emails from system (cantact-form, registration, passwd reset)With

With: add_filter( 'wp_mail_from', 'my_mail_from' ); function my_mail_from( $email ) { return "[email protected]"; } add_filter( 'wp_mail_from_name', 'my_mail_from_name' ); function ...
kornholio's user avatar
1 vote
1 answer
83 views

Search with indexing and linking to PDF content

I need to implement a search functionality that makes the content of a PDF file indexable and links directly to the selected content area of the search query. Is that even possible and what is the way ...
tinytree's user avatar
  • 111
0 votes
1 answer
12 views

Is there a way to natively return the full filesystem path when using $wp_styles?

Looping through global $wp_styles, $wp_styles->registered[$style]->src returns the URL of the resource e.g. https://domain.com/path/to/file/. I'd like to source the local filesystem path instead ...
Motivated's user avatar
  • 215
0 votes
1 answer
181 views

Hook on opening a media/document

I am trying to find a hook to be able to set a datalayer.push everytime a document is opened. It could even be something that runs after the document is opened ex: https://example.com/wp-content/...
David Vimaweb's user avatar
0 votes
0 answers
27 views

Wordpress - tracking options

I wanted to ask, how much is it possible to track users when using WP as a CMS. For example, can I see, when users go to certain directories like wp/files or open specific documents like wp/files/docs/...
Mel's user avatar
  • 1
0 votes
0 answers
62 views

How do I upload my Wordpress code files from previous website onto local host Wordpress website?

I have Wordpress code files from an old website which I downloaded from WP File Manager that I want to look at on my local host. I have downloaded Xampp and set up a local host Wordpress website. How ...
H D's user avatar
  • 1
0 votes
0 answers
290 views

File doesn't exist! in wordpress function.php file while creating new post or page

i have been working on wordpress website, from past two days i am not able to add new posts/pages while i click add new page or post, below image shows the error cant able to create new post cant ...
Harish Reddy's user avatar
-1 votes
1 answer
993 views

wp_temp_dir does not change the /tmp temporary default directory

I have a problem changing the temporary folder. I have have define the new temporary folder using define( 'WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/' ); before the line /* That's all, stop ...
mors's user avatar
  • 103
0 votes
0 answers
544 views

Setting wp_temp_dir and permissions not working for "Missing A Temporary Folder" error

I have a problem uploading files to my main webpress site (e.g. www.main.com) and all the other pages that live in it (e.g. www.main.com/anotherpage). I know there is a method to set a temp folder ...
mors's user avatar
  • 103
0 votes
1 answer
30 views

Theme, Wordpress Version, MySQL Version, PHP Version Update affected files and folders

I noticed that my custom files and folder was gone after theme update, and I dont really know what is the exact scope of the affected custom files and folder: How do I keep my Files during Wordpress ...
thedarkness97's user avatar
1 vote
1 answer
41 views

"dashboard"-named PHP file doesn't get included

I've made a simple "test plugin" to demonstrate the issue: my-test-plugin/ ├─ includes/ │ └─ dashboard.php └─ main.php <?php // dashboard.php echo '<h1>Dashboard</h1>'; &...
goodUser's user avatar
  • 111
0 votes
1 answer
276 views

Can WP plugins access files outside the installation folder?

If I have multiple WP installations in let's say /var/www. Can a plugin be developed to access files outside its own directory? I want to host multiple installations for different customers in the ...
michidk's user avatar
  • 103
1 vote
1 answer
34 views

External pages redirecting back to wordpress

So I've created a folder under my wordpress root directory containing simple vueJS html files and assets such that anyone can access them from a url like: Mywordpress.com/externalfolder My external ...
Joshua King's user avatar
0 votes
0 answers
536 views

Save media files (images) to database instead of the filesystem

I have an out-of-the-box installation of WordPress with WooCommerce. I see that uploaded images (e.g. when I create a product) are saved in the filesystem under wp-content/uploads/. I would like the ...
Maksim Sorokin's user avatar
0 votes
1 answer
477 views

Serve contents from Nextcloud / WebDAV

I am looking for a solution to show the contents of a folder in a Wordpress site with the folder being hosted on Nextcloud. Since Nextcloud and Wordpress both support WebDAV I thought it would be ...
user1192748's user avatar
0 votes
1 answer
89 views

temphangle variable missing when using wp_filesystem copy

I get the following error when using $wp_filesystem->copy(); to copy a file from one destination to another. Undefined variable: temphangle in <b>../htdocs/wp-admin/includes/class-wp-...
RafaSashi's user avatar
  • 467
1 vote
1 answer
2k views

What dependencies should I load and to use the WP_Filesystem?

I'm building a Wordpress theme which has a WP_Filesystem call in it: <?php $wp_filesystem = new WP_Filesystem_Direct(null); echo $wp_filesystem->get_contents(get_stylesheet_directory() . ...
ralphjsmit's user avatar
1 vote
1 answer
2k views

Can I delete `wp-config-sample.php` after installing and configuring Wordpress?

Can I remove wp-config-sample.php after installing and configuring Wordpress? Could this have any consequences in the future? Is this file restored after updating? At first glance, it just seems ...
kanlukasz's user avatar
  • 506
0 votes
1 answer
147 views

File ownership for file tree php user ID - Folder permission 775

I have the same issue as the below topic, where all my folder are set to 755 but I am unable to run updates or upload new media due to folder permissions. Once I set it to 775, the problem is resolved....
iamonstage's user avatar
1 vote
2 answers
7k views

How to replace file_get_contents() with a Wordpress Filesystem call

I'm using the PHP file_get_contents() function to retrieve and echo the contents of an SVG-file. <?php echo file_get_contents( get_stylesheet_directory_uri() . '/assets/images/Search_Glyph.svg' ); ?...
ralphjsmit's user avatar
1 vote
0 answers
42 views

How to first edit in local Wordpress editor on page and the add code?

I started a local WordPress site using DesktopServer. (Atom for coding). And I want to start creating the new website by first creating a "page" in local WordPress and creating a basic layout, and ...
Jesper's user avatar
  • 11
0 votes
1 answer
1k views

How to write to a text file and save it in a folder for later download?

I've a template file in the 'templates' folder that performs a function based on the JSON input it receives from an external source. I want to write that JSON input in a text file and save it ...
Sid's user avatar
  • 1
1 vote
0 answers
173 views

Save PDF File From Plugin to Filesystem /wp_upload

i would like to call a function from another plugin, that returns a pdf. Is there a possibility to save this pdf in the Wordpress Filesystem - wp-upload for example? I just found $wp_filesystem->...
Steven's user avatar
  • 11
1 vote
1 answer
49 views

Wordpress Login doesnt respond after using Filezilla to upload my files on the server

Last week, the most recent update of Wordpress 5.3 came out and I updated it. As many other people, my website had a lot of problems after the update, due to the fact that my plugins such as openwp ...
René Ebert's user avatar
0 votes
2 answers
300 views

How can I get blog content from SFTP?

I inherited a site that was compromised (I'm not sure what version of wordpress, the crash happened last summer). I have CLI access, and can SFTP into the server. The only thing I want to get is the ...
Morgan Smith's user avatar
0 votes
2 answers
97 views

Adding regular php file to site

How do I create a page(in wordpress theme folder) so that it can be accessed on my site as examplepage.com/somepost.php? I can see it as examplepage.com/wp-content/themes/mytheme/somepost.php but is ...
Zae's user avatar
  • 3
1 vote
1 answer
847 views

Plugin writing: access file that was just uploaded

I am having trouble finding a solution for following problem: The user should upload a file in the menu of my plugin; the file is uploaded to the media folder by using media_handle_upload(file), ...
Yato's user avatar
  • 17
0 votes
1 answer
893 views

Failed opening required

I am new in wordpress development. Tried include a selfwritten php-file into htdocs/wp-content/plugins/abc/abc.php IDE sugesting me to use: require_once '../WPNonce/WPNonce.php'; but WordPress ...
SL5net's user avatar
  • 105
2 votes
4 answers
16k views

WordPress and plugins can't update ("inconsistent file permissions" error)?

I have a problem - when I click on "Wordpress update", I receive this message: Downloading update from https://downloads.wordpress.org/release/wordpress-5.1-new-bundled.zip… Unpacking the update… ...
Pavle Randjelovic's user avatar
0 votes
1 answer
138 views

Where to store sensitive uploaded file?

I'm developing a plugin. Where is the best place to store a user uploaded file that is sensitive in nature? It should not be web accessible. Given the encoding of the file, it's necessary that it be ...
Scratcha's user avatar
  • 115
1 vote
1 answer
668 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 ...
James Hamann's user avatar
1 vote
0 answers
212 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 ...
Strangerous's user avatar
0 votes
0 answers
27 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 ...
Chris Wendel's user avatar
0 votes
1 answer
1k 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 ...
Bruno  Vincent's user avatar
2 votes
1 answer
566 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 ...
ellen's user avatar
  • 345
1 vote
0 answers
116 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 ...
Justas's user avatar
  • 111
1 vote
1 answer
3k 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 ...
Kyle Martin's user avatar
2 votes
3 answers
11k 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 ...
Igid's user avatar
  • 133
2 votes
2 answers
5k 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/...
Muhammad Muazzam's user avatar
0 votes
1 answer
38 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....
Jacob Raccuia's user avatar
0 votes
0 answers
150 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 (...
m2 eCommerce's user avatar
1 vote
1 answer
114 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?
Taylor's user avatar
  • 11
2 votes
1 answer
296 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......
grazdev's user avatar
  • 1,323
1 vote
1 answer
247 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 ...
OsakaWebbie's user avatar
0 votes
1 answer
205 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....
Uttam sahu's user avatar