Removing WordPress Files from a server - php

I have a server with hundreds of websites they all have the WordPress files however we only need the important files for example, wp-config, theme, plugins.
I'm looking to run something to clear all WordPress files.
What's my best solution?

If you're looking to eliminate double files. Stick one wp setup in a folder somewhere and symlink the rest per site.
That way every site gets everything but the specific files such as wo-config.php and /wp-content/ and such from your one copy.

Related

Can we recreate Drupal Website with just the "sites" and "themes" folder?

I was shared a repo with just sites and themes folder in it.
I was suggested to download drupal, install it, and then try to integrate these two folders into it. Is that possible? Because themes somewhat works with no images to display, but on replacing "site" folder's files, the website breaks.
Is it possible to work with it, if yes, how so?
P.S - I'm new to Drupal. Thanks.
If you are just want to copy the looks of the site in the repo, the themes folder should be fine. If you take what's in there and add it to what you have, you should be able to install a new theme in the UI. But, it would be convenient if you gave some info about what's in the folders.
The content is accessible from the database. So, if you have a database dump in the repo, there's a chance to get that too.

I wonder if Wordpress uses any type of configurational inheritance from main site to the nested site

With Wordpress I had only some experience in setting up different sort of plugins, never dealt with how it's done on system and engineering level. Now I'm going to move my site from host to another host and need some advise over the following thing:
with my existing hosting I host 2 web sites: root one (andrtsa.com) and one I created later (oksana.photography) that I noticed is shown with its own content under [public_html]. I do not need old root site, it's outdated, I only want to migrate new one in subfolder. I wonder If I can just take (copy) whatever I have in root folder of my site (folders like [public_ftp], [perl5], [.cpanel] etc), and I'm removing everything from public_html except [oksana.photography] folder which whole content I copy to its parent [public_html] folder like on the picture:
I wonder if nothing. My only concern is that Wordpress (php) might use some form of folder to subfolder inheritance, like if I remove something important that is in public_html and missing in [oksana.photography] configuration file or something I could be in trouble, not sure though if anything like this is used in Wordpress. Please advise

Will moving a wordpress site create any problems with plugins?

I am currently working on a wordpress site, and the folders are just such a mess, that I want to clean them up and make it a bit more bearable to look at. The site uses multiple plugins, and the main site is in a folder inside the httpdocs folder, which makes me wonder if the plugins will cause any problems by moving the site to the root.
Anyone that knows the answer to this?
Wordpress uses a standard structure for plugins and themes. While these may be overwritten, it is not recommended to do so.
If you really wanna do so, you could take a look at this https://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder for reference, and move it around. Remember that the plugin may use wordpress hooks and filters for adding their own CSS/JS, and thus moving the folder out of the web-directory will make these unavailable, and break the plugin functionality.

Is it OK to edit/update Wordpress theme files over FTP?

I'm working on developing my first Wordpress theme. As of now, I've just been coding the files, zipping my theme folder, and then uploading and activating the theme in my Wordpress Dashboard to test it.
However, this has become quite tedious, as I basically have to:
1) code a bit of my theme, zip into folder
2) deactivate/remove old version of theme in Wordpress dashboard
3) upload new version of theme, and activate
4) repeat...
I'd like to install Wordpress locally, but I don't quite understand how to do that yet, and I'm not familiar setting up a local webserver.
SO... rather than do it the tedious way that I have been, is it OK to just make sure my theme is activated, and then edit my files and overwrite/upload them to the wp themes folder over FTP using Filezilla?
I'm guessing it'd be considered bad practice, but for the time being would this work well enough until I learn a better way?
That's definitely okay.
You can modify the files locally and then upload the changes using FTP. Make sure you have backups so if you accidentally FTP the wrong changes you can easily revert them.
Yes you can absolutely download the uncompressed theme and modify and put it back using ftp.
Also, some themes support whats called a child theme. This allows you to override the theme with your changes, without changing the original source code. Which in turn gives you a better upgrade path from the original theme provider when they have updates.
I have actually had some weird formatting issues with WP after manually editing files, where they would no longer run, so I try to avoid it. But I have bad luck that time.

How to "save" my wordpress blog's posts in same url format and remove wordpress?

I have a Wordpress blog running on my site and I have no time to continuously upgrade the software and I pretty much want to remove wordpress. It's broken at this point anyway, I can't really get into the admin area, but I suppose I could try to hack my way through.
Anyway, I'd like to save the posts that I have and keep them under the same URL structure so they're still relevant in the search results indexes.
Here's the site in question: http://www.danielfischer.com
Any suggestions on how to keep the site up but possibly turn it static yet keep the same url structure? A static archive of what used to be and have the urls still work pretty much?
Thanks.
You can use a mirroring tool like HTTrack to download the entire site to individual HTML files. HTT shouldn't have any problem making folders from the URL structure (though if there are any non-pretty URLs linked, it'll grab those too).
From there, just upload those files and call it an archive (maybe put them in a separate directory & point the server to it so Wordpress doesn't get totally wiped out, just in case).
Switch on WP-Cache or better yet, install WP-Super-Cache. Make sure it caches every page you have (set the cache timeout to never in settings). This will create static versions of every page within the cache folder. Once you have all pages cached, go into the cache folder (/wp-content/cache/supercache/%{HTTP_HOST}/ by default, where HTTP_HOST is your host name) and copy all of those files and folders into a new webroot (create a new site with whatever the hosting panel is you are using, or in apache manually). Switch your domain over to this new webroot and if everything is working, delete wordpress.
A good shortcut would be to setup a site (such as test.yourblogname.com) and point the sites directory straight into the cache directory (ie. point it to /wp-content/cache/supercache/hostname/). That way you can test it without risking anything.
This could be a help for you
http://www.setuptips.com/wordpress/recovering-a-broken-wordpress-blog-without-a-backup-copy/

Categories