Putting a custom directory inside wordpress - wordpress

I have a simple HTML microsite, which I want to put inside my wordpress website. For example: Wordpress website is: abc.com
I want to put my microsite inside this wordpress site. So URL becomes:
abc.com/microsite/
But, wordpress treats any url as its own. How can put "abc.com/microsite/" urls to Wordpress Ignore list. So that any pages inside microsite folder executes independently.

just put you folder 'microsite' in root(Where you find wp-admin,wp-content and wp-include folder). and
you are able to access the folder
"abc.com/microsite/ by this url

If you are still having issues with accessing the subfolder, try renaming the .htaccess to .htaccess-bak in order for WordPress to regenerate the file again. Understand that your website might temporarily go down.
I've found this solution to help in some cases, but I don't know exactly why, ergo I am not sure it will work. And if you feel uncomfortable editing the .htaccess file I suggest you learn more about it (as should I). It is a very powerful file and WordPress uses it a good deal.
P.S. The file is located in the same folder, WordPress' root folder where you find /wp-admin/, /wp-content/, etc. It is hidden by some hosting providers, but I've always been able to find them through FTP with the hosting companies I've used before.

Related

Can I have a dynamic and static website at the same time?

The situation is the following. I’m a beginner developer. Bought a domain and a simple hosting plan (includes 1 Msql base). I created a static HTML page. I modify it sometimes to show my progress.
Now I want to practise WordPress. Is it possible to keep this static webpage and create another dynamic page in WordPress? So this static page will be the main where I’ll put a link for the dynamic page.
Sorry if my question is too simple. I couldn’t find the answer anywhere.
Thanks!
Yes, you can create sub folder in public_html directory something like /public_html/xyz. so your domain will be xyz.com/xyz
now you can install wordpress in xyz folder and create dynamic website there.
Maybe you can use a sub-domain, they are normally free inside the hosting plan. You can have a folder for the html and other folder for the WordPress. Then just assign the correct folder for the main domain to the html and the subdomain.whatever.com to the WordPress.
Yeah there are a few ways to do it. Simplest is to name the page "index.html" and stick it in your root (public_html) directory. That page will display instead of the index.php file Wordpress uses, at least for the homepage.
Wordpress should "take over" if you navigate to any other URL.

how to view and edit a wordpress php file locally (MAMP)

I am helping out creating a few wordpress templates. I've been sent over the basic content (wp-admin/wp-content/wp-includes folders and other wp-* files).
They've already created a new theme, and one front-page.php file. This file includes "parts" such as get_header and get_footer.
Essentially now they'd like me to create new templates using this theme, and php variables to make updating easier. My question is - how can I view this so I can see what i'm making?
I downloaded MAMP and set up a local server, and if I create a sample .php file in the htdocs folder, that page appears correctly. However when I paste the Wordpress folder that I was sent, nothing loads. Is there a special way to get a front-page.php including partials to load within a theme? Am I missing something obvious here?
You will have to Install WordPress completely in order to make it work. Then you will be able to add your folder in the "Themes" folder of WordPress..
You can Google "How to Install WordPress on Mamp" for more info... you will find plenty of websites helping you.
I also suggest you read a few blog post on how to create WordPress Themes... :)
Good luck

Disable wordpress css on subdirectory

Ok this is almost a repost except I know the cause. Ok So I have a site in a subdirectory under my www folder (which appears to simply be a link to the public_html folder.) Anyhow this site is not a wordpress site, even though the parent site is. My wp-admin wp-content and wp-includes directories are also in the same spot.
My problem is that the second site in the subdirectory is automatically using the wordpress css for some reason. I do not want it to do that. I have a css file for it, but it does not load it and uses the wordpress one instead.
Is there a way to correct this so that it only uses the css file I tell it to use?
The only way that this site will use the Wordpress CSS is if it somehow imports the Wordpress CSS. View the page source and try do discover from where the site is getting the Wordpress CSS. Make sure that you are not calling the tag anywhere. If you have managed to strip away the Wordpress CSS, then just reference the desired CSS as you would with a static HTML site. The fact that it is in the same directory as the Wordpress directories will not make a difference.
Ok I fixed this. I simply renamed the css file to something other than style.css In this case I name it santastyle.css as this site is meant to work as a secret santa website. This solved the problem.

Moving down entire wordpress installment one folder

I've been developing a wordpress website on the same place where it's supposed to go live, just in a /beta folder to keep it from regular visitors. Now it's done, I need to put it live, by moving the entire wordpress installment I have in the /beta folder, down into the root of the domain.
The problems I encountered when I first tried this were that everything automatically links back to the /beta folder, for example my stylesheets link to the right location but the /beta/ folder is included in the link, and I can't seem to find out where to change this. I've tried the Yoast wordpress move tutorial but that seems to be made for entirely different domains, and this is inside the same domain.
So, how would I change the automatic linking? It's not all in the .htaccess file, that's just for in-site permalinks.
The Wordpress Codex has a canonical document for this, Moving WordPress.
Whether you're moving from domain to domain, or inside the same domain, doesn't matter. The process is always the same.

wordpress theme doesn't appear

I'm having a very basic problem: I'm trying to create a new theme for a wordpress installation locally on my computer.
I've created a styles.css and index.php file and put it in a folder in wp-content/themes. But it doesn't appear in the Wordpress themes page.
As a test, I made a change to the description of one of the existing themes (Twenty-Ten) in its style.css, and refresh the Wordpress themes page, but the old description continues to be shown. This suggests to me that I'm simply using the wrong folder, but that's not possible! Any ideas on this problem much appreciated.
UPDATE: In fact, even when I delete Twenty Ten from the Themes folder, it's still available as an option in the Wordpress backend, and I can activate it... Very strange...
G
I agree with your diagnosis. You are either looking at the wrong folder or in fact the wrong computer. There's no other way that you could change the theme to one that has been deleted.
I suggest that you confirm you are in the same universe you think you are in. Create a simple file localserver.txt in your WordPress directory and then confirm that you can access that file.
If you can't, you have your answer. You are somehow accessing a different location.
If you can access that text file, you need to go further and look to see if something like the site url setting is redirecting you to the live site, without you realizing it, when you access wp-admin.
Beyond that, I'd need to know more about your setup. Something like having www.example.com in your /etc/host file and not example.com can cause similar confusion...
Are you using Wordpress Multisite?
In that case you have to 'enable' that theme in the Network admin manager

Resources