I had a wordpress blog which was hosted in the public_html directory but in order to add more features I have developed a seperate web-site. I have a new index page and several other pages to serve my needs. My problem is that I can not just put the wordpress into a new directory like blog because I would like to keep all my links and content same. So I would like to keep the wordpress blog but I also would like to have a new index page. Any suggestions?
You can move your wordpress install into a new folder, no problem. Just make sure to update the paths in the wordpress config, otherwise the links won't work correctly.
If you've linked to blog pages in blog posts, you'll have to edit them manually.
See Moving Wordpress and Moving a root install into it's own directory (they're different processes, it sounds like you want the first link, but read the second just in case).
If you want external links to continue to work, you could either (a) try to catch them and redirect with URL Rewrite rules in .htaccess, or (b) write a custom 404 error page in something like PHP that would redirect them.
Related
I have build a blog project using this blog (https://www.sitepoint.com/wordpress-headless-cms-eleventy/).
I want to make it waork:- As I add new blog on wordpress it should apear in my live site but without re-running server in my code.
It should just add new blog html page in the built folder. but definitely it should not re-create all pages.
I'm building a Wordpress site for a friend, and she asked me to "put the old site back up" while I'm working on the WP site. The old site lives in a /verb subfolder, so I put a PHP redirect in the domain/index.php page to the domain/verb folder.
Now, when I go to work on the WP site, it just redirects to the old site. Is there a better way to do this? I need a way to develop the WP site while visitors are sent to the old site.
Note: Her site is on godaddy, which means I didn't install WP myself and can't really move the WP installation to a sandbox area while I'm working on it. Is there an .htaccess trick I could be doing, maybe?
It's been a while but I'm pretty sure i've used a plugin before that allowed me (when logged in as an admin in WP) to view the site using a different theme than the one the rest of the world is seeing.
You could copy the active theme and change the name, making your alterations on the new theme while leaving the currently active theme untouched.
This would only work if you were re-skinning the site and not modifying any of the database content.
A quick google search came up with this plugin: https://wordpress.org/plugins/theme-test-drive/, but there may be others out there...
I have an established wordpress with a members section and forum, the whole site is being redeveloped but with Joomla 3.0, A lot of the content will have to be just copied and pasted into the new site but the owner of the site wants to keep the old wordpress site up for a while and possible blend it into the newer joomla site with css and styling.
I've tried throwing one site on top of the other and the only two files that collide are the license.txt (that I won't worry about)and the index.php file.
Both sites will work fine if its their index.php but if it's wordpress's index.php the links on joomla will give an error, and if it's Joomla's index.php, any wordpress links will go to the joomla index page.
What is the best way to engineer this to the main index.php will be Joomla ?
Here is the wordpress index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* #package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* #var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php')
Thanks
1st thing I want to mention here is having two separate cmss' in a directory is a bad idea. If had searched a bit on google you would find this helpful.
JConverter
As the name suggests, JConverter allows you to convert your WordPress
blog into a Joomla site. It can import users, blog posts, categories,
pages and even links from your WordPress blog to Joomla.
If you are not sure about the quality you can start reading the comments.
Advice
have a separate folder for two cmss and use a .htacess file to get the job done. You can find tons of articles explaining how it should be done.
After thinking about it here are the options I think I have
Option 1)
Both Wordpress and and Joomla can coexist on the same root folder, the only files where there is a conflict would be the index.php (and some license text file) and this could be engineered in such a way to work, but having 2 content management systems on the same domain root isn't a great idea in the long term as the root domain has loads of files there and updates and security patches in the future, it's open to something going wrong.
Option 2)
Put the new Joomla site on the root and then move the older site into another folder then use apache rewrite and an .htaccess file that would rewrite the location of the word press files and thus keep the original links
Option 3)
There is a component of Joomla called wordpress for Joomla which makes Wordpress a part of Joomla and would keep all the links of the original, But it's designed for people who have a Joomla site and want a dedicated blogging tool like Wordpress, not the other way round. I was talking to the developers and there unsure if this would work the other way round and then there's plugins ect to think about.
Option 4)
Leave the the current wordpress site in the same position and upload the new site to a new folder called /en/ (As in an english version)
Option 5)
JConverter still only in beta
I'm going with option 4:)
Why would you keep both sites? That just means duplicate content and is going to stop the new version of the site from ranking. The best option in my opinion is ditching your old site and making sure the URL either are the same (which can be achieved with a SEF component such as sh404sef) or use 301 redirects to your new URLs which will tell Google the URL has permanently changed.
I'm creating a new plugin for WordPress that requires an outside website to use a web service. For instance, if there are two sites, A and B, the plugin will be installed on A with all associated data stored in the WordPress database for Site A. Site B will use the web service to grab data in XML format from Site A.
Is this possible? What would be the most secure way of pulling this off?
I could just have the web service as a PHP file in my plugin, but that's going to require the outside domain to hit something like:
http://www.example.com/wp-content/plugins/plugin-folder/web-service.php. It seems like a bad idea to expose the level of depth of the WordPress setup.
I could have my plugin create a few files in the root so that the web service call would be to http://www.example.com/web-service.php, but having my plugin install stuff outside of the plugin directory also seems like a bad practice.
Another thought: Could I put the file in my plugin folder, but add a line in file .htaccess to make http://www.example.com/web-service.php go to it?
What is the best, most secure way to go about this?
I would set up a rewrite rule in .htaccess to let the user get to your code without knowing where it is. I don't think there is an easy way to add specific routes to the WordPress front controller, but you could see if there is an action or filter to do that.
Here's a post on adding routes: How can I create custom URL routes?
In my personal opinion, if I installed a WP plugin and you created a new file in my root directory, I would either delete the file or the plugin all together. I would also try to avoid adding a .htaccess file. This would again make me suspicious.
What I would do is, upon install ping a file on Site B (your site) that captures the location of the plugin folder on Site A (their site), because WP might be installed inside of a directory and not at the root. Then you know where the "web-service.php" file is located. Then you can just hit that file whenever you need. There is no reason for .htaccess rules, or creation of new files.
Just a suggestion :)
Yes I know that there is a plug in to bridge the two, but I want to keep them separate. Basically I want the nav menu in wordpress to point to a sub domain or a folder with the mybb forums. Everyone keeps telling me to use the plug in. Also if you add folders to wordpress, will it not just give you errors that those pages do not exist? So is a subdomain the best choice?
It's completely fine to keep the two separate without using the bridge. If you want a link to MyBB from a Wordpress menu, you can add it in the Admin Panel -> Appearance -> Menus, add a Custom Link to your forum URL.
By default, the .htaccess file in Wordpress will not rewrite URLs any folders/files that exist on the server. So it is possible to have MyBB as a subfolder in your Wordpress installation. However, it may be cleaner and easier to maintain if you have it on a separate subdomain.