Link to home
Start Free TrialLog in
Avatar of Crazy Horse
Crazy HorseFlag for South Africa

asked on

News folder auto generated by Wordpress

Is it possible for Wordpress to add it's own folders?

I have noticed that it keeps adding a 'News' folder into the root of the domain, not in any of the wp-content folders or plugin folders etc. and then when I go to the blog page it stops working until I either rename or delete the folder. I don't know if it is possible for a plugin to do this or my permalink structure but it seems to be random.

Permalink structure:

http://mysite.com/news/%postname%/

Open in new window

Avatar of David Favor
David Favor
Flag of United States of America image

1 Is it possible for Wordpress to add it's own folders?

Yes.

WordPress can actually populate folders in the file system or more likely populate a post/page slug inside WordPress which is referenced like a folder.

2) I have noticed that it keeps adding a 'News' folder into the root of the domain, not in any of the wp-content folders or plugin folders etc.

Correct.

This is likely a post/page slug.

3) and then when I go to the blog page it stops working until I either rename or delete the folder. I don't know if it is possible for a plugin to do this or my permalink structure but it seems to be random.

No clue what this might mean.

Best to provide actual URLs for testing.

For example, you know what "blog page" means... the actual URL... No one else does.

To help you figure out + fix problems, providing your full/clickable URLs will provide fastest resolution.
Avatar of Crazy Horse

ASKER

Thanks David,

Cannot provide actual url's in this instance but it is basically:

https://mysite.com/news

That is just the standard blog page ie: index.php which has the bog standard wordpress loop: if(have_posts() ): the_post()......

But because I wanted 'news' in the link structure ie: https://mysite.com/news/some-article I set a custom permalink structure in the wordpress backend


https://mysite.com/news/%postname%/

Open in new window



3) and then when I go to the blog page it stops working until I either rename or delete the folder. I don't know if it is possible for a plugin to do this or my permalink structure but it seems to be random.

This means that when the folder 'news' is created somehow and I go to:

https://mysite.com/news

the blog does not show up, instead I see:

Index of /mysite/ news
  • Parent Directory

If I then delete the 'news' folder, it works as normal again.

I need to figure out why the news folder is being generated and how to prevent that.
If you set permalinks to https://mysite.com/news/%postname%/ this will break all past permalinks.

This is not recommended.

Better to set https://mysite.com/%postname%/ then setup /news to work as a tag or using a TOC (table of contents) plugin.

If you set ttps://mysite.com/news/%postname%/ then ttps://mysite.com/news/ will likely always be a 404, unless you specifically create a page called /news with some content.

What you're trying to do will cause a great deal of confusion + if you ever try changing back in the future (after much content is added), there will be even more complexities.

Better to use https://mysite.com/%postname%/ for permalinks, then create some /news hierarchy as required.

Might be worth while to scan through WordPress plugins looking for TOC + TAG plugins + also maybe Show Post plugins which manage complex content hierarchies.
Thanks David, I will take a look into TOC + TAG plugins.

But, this still isn't explaining why a news folder is being created by wordpress in the root folder which seems to be at random.
Having your actual site URL will make this much easier to debug.

Without a site URL, every person reading your question has to imagine your actual link structure + map all this out mentality.

Imaging out a problem will almost always be wrong.

Along with an actual URL, having an attached copy of your .htaccess file + also your Apache config file will also likely be required.

All these interact together, so when you change your permalink structure, massive debugging (with real URLs) is required to resolve problems.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.