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

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.

Related

Edit themes from wordpress

I know we are allowed to used the themes from wordpress and edit them in the theme editor.
However, working in the theme editor is really annoying. Does anybody know if there is a way to download an entire theme file from Wordpress, so that I can customize it in the editor on my laptop?
thanks for the help
You can use Download Plugins and Themes from Dashboard plugin. it's provides a "download link" in theme's detail page.
While #mohammad's answer is correct, I find it best not to clutter a site with unnecessary plugins, what works best is if you login to your server via FTP or your host's cPanel and download the files that way. It keeps your Wordpress install clean of anything that won't be used too frequently.
If you have any questions on how to do this, your host will be able to guide you without issue.
There are multiple solutions to this problem, you can change theme files through the FTP/SFTP account using Filezilla. or you can access your CPanel account go to the File manager and access your file easily. Other then that you can clone your website to your laptop through any migratory tool after that you can configure your website to the localhost and just make changes in Theme according to your requirement from the Xamp/Wamp folder at your system.

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

Removing WordPress Files from a server

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.

Restoring old WP install, renamed wp-content... restoring upload links?

Expertise level: medium-low; I'm not afraid to find a file and edit it, but I don't really understand the inner workings of PHP.
I'm trying to restore a WP blog from backup, but with a fresh 3.7.1 install and a lot more attention to security after a hacking incident. Among other things, I've used Better WP Security to rename the wp-content folder.
My steps were:
Install 3.7.1,
Import the database,
Activate Better WP Security, rename wp-content,
Pull the old theme into the themes folder.
The database restore went fine, and the site is about 90% there, but nothing that linked to the old uploads folder in wp-content is linking now.
I've searched and replaced all of the instances of wp-content on the site using an FTP program and Sublime Text, but I'm still not getting any re-linking. Images are still being sought with generated HTML that looks for things like http://foo.com/wp-content/uploads/2012/12/pants.jpg.
Where else do I need to look for and replace wp-content to the new content folder name? I've tried poking around in the database but I have no idea where to look or what to look for.
I've never used Better WP Security, but if you need to update references to wp-content in the database, the best way to update the database is the Search and Replace for WordPress Databases Script mentioned in the Codex. Don't just try updating the database manually - if the fields contain PHP serialized data (a lot of them do) you'll break things.
Sounds like you already have a database backup, so you should be safe just to give the script a try. The search and replace values will depend on how Better WP Security works, but if the directory is just renamed (to, say, newname), using /wp-content/ and /newname/ should do the trick.
Wordpress saves the attachments URL in the database so you have to replace the image paths in the sql dump (you can use sed ).
You don't have to touch the wordpress core and in the wordpress themes the attachments won't show in the htmls cause were called by wordpress functions.
You can make this
Unzip wordpress in a directory
Make the string replacement (with your new domain) in your old dump sql
import the sql dump
install wordpress with your mysql data and the same db prefix in the backup (it should say that there's already a wordpress installation)
That should work

How to clone wordpress site for the develope purpose?

I have a wordpress site and I have to do modifications very often so i would like to create clone of that website for testing because i would like to test my modification first for a few days before i put them on my site.
There are links to the "real" site everywhere so i'm not sure how to do that.
UPDATE (improved explanation):
Problems:
links are absolute
this need to be online so other developers can test site
Copy/paste your entire files from your domain to everywhere you want as first step.
Go to the phpMyAdmin or use a tool that permit to you to export your database as .sql.
Open the .sql file and run a find and replace and replace all your absolute path (just the one before wordpress: ie.: of this http://www.yoursite.com/wp-content/etc. Replace only http://www.yoursite.com)
Check for the permission of the DB, maybe you should change also the Server name, DB Name, Username and Password.
Create a new database and import the file you exported and modified the minute before.
Now you got a clone of the previous website ready for your experiments on both side, files and DB.
2nd result in Google for me...
http://wpmu.org/quickly-clone-and-migrate-wordpress-sites-with-the-duplicator-plugin/
If you're going to use a different hostname or path for the copy of the web site, it's not as simple as copying your files and exporting / importing your MySQL database. There are, in fact, embedded absolute URLs in various columns of the database.
There's a step by step procedure here.
http://codex.wordpress.org/Moving_WordPress
If you were working on WP MultiSite you could avoid having to duplicate your database and then doing a sql find and replace as mentioned by using one of the WP cloning plugins.
The NS Cloner - http://wpmu.org/clone-sites-within-a-wordpress-multisite-network/handles everything for you automatically including the DNS, DB, and Hosting. Based on your mutlisite setup you can then deploy it to a new subfolder or subdomain. For advanced features after your new site is live you can use the Pro Version and do advanced things like search and replace on the live site.
Again this is for MultiSite only, however I would highly recommend moving to that architecture anyway to allow you to take advantage of all of WP multisite has to offer.
WP Staging allows you to clone an entire site including database and files into a subdirectory of your main site for testing purposes with just two clicks:
https://wordpress.org/plugins/wp-staging/
What's your problem exactly?
You just need to download all worpress files from your server.
Then create a local copy of the database so that you have all the data.
All the links are relative in wordpress, so you won't have any troubles with links to the "real site" ;)

Categories