How to hide WordPress from public view - php

I have developed a site in PHP which uses WordPress to provide news article content. Both my application and WordPress code bases sit on the same physical box.
The application uses the WordPress loop to pull content from the WordPress back-end and display it within my application.
The content editors for the site require access to the Wordpress back-end to add, edit and remove content as required. WordPress is currently accessible via a sub-domain i.e blog.mydomain.com. However, I do not want to expose WordPress publicly as it is currently, firstly because I want WordPress to behave transparently and secondly I do not want to get penalized for duplicate content when ranking for SEO.
The obvious solution would be to lock down access based on the visitors I.P address, but this is not practical given that the content editors can (and do) access the site from anywhere and not a fixed set of I.P's.
Another solution would be for the content editor to submit a secret parameter in the query string to identify themselves as an administrator i.e &wpadmin=true. However this doesn't seem ideal either.
Is there some other way I could consider architecting the site, or provide some other more suitable access control mechanism for WordPress?

Have you considered simply slapping a htaccess password dialog into WP's root directory? That's close it to the world, and still make it available to who has the right login info.
The only downside would be that your editors would have to log in twice, but the web server login credentials can be easily stored in the browser.

Related

Duplicate content on homepage of custom made PHP script

I coded a simple php blog. On the homepage it displays the most viewed post and also links to the actual page of the post similar to the frontpage of a wordpress blog for example.
How to avoid duplicate content for SEO purposes? Is there a certain html tag or code for search engines to prevent considering the post on homepage and the actual page duplicate??
Thanks
Homepage is the page that index.php or index.html outputs, even if this is a redirection to an inner file. If you want to make a cms for example with an admin panel and offer different templates, styles and plugins, and decide to divert the design code from the engine code, it is is functionally common sense that you 'll include the template in other template-folders (to keep the filesystem clean, well-organised, and easily accessible from the design work). In this way, admin panel will insert and update your site parameters to the database and the root index file will read those parameters from the db. So the best you have to do for SEO means is to create and keep well-informed all the xml files (sitemap, feed, rss, atom), include keywords (taxonomy),tags and metadata, coherence at internal and external links, keep a clean design output and a lot more parameters that needs a lot of space and time to analyze.

Trying to incorporate members area from one site into another

I am working on a website where I need to use the login form to log into a different site and then bring the member's area from that site over to the one I am building.
I have access to both sites and can make changes on either one. I would incorporate the code from the old one directly but it is in ASP and I'm working with PHP.
Any ideas? The purpose would be for someone to login to the site through site A (no problem) then get the information from site B (no problem) and present it in site A (no problem if I use cURL to get the site and break it up then display it on the new one). The issue I get into is the links that are on the new site and gathered from the old site will still point to links on the old site. Maybe there is a way to dynamically generate those pages on the new site somehow? Or am I going about it all the wrong way?
It's essentially a proxy. You need to parse and rebuild the links in the html source code received from site B. There are no functions available for this, but there are numerous open-source proxy scripts you can take code from.
Glype should be open-source (site appears to be broken now unfortunately).
https://www.glype.com/
You need to split the links to change them depending on where do they point.
Links to css/js should be rewritten to point to the real url (note that ajax content won't work, because you can't do an ajax request to another website)
Absolute links to the real website should be changed to relative
Relative links should point at your website (ex. $new_url = '/viewpage/?page=' . urlencode($url);)
Absolute links to other domains (not the old website that you proxy) should be dealt somehow, think about what do you want to do with them exactly.

Creating a Dynamic site where a user is allowed to register and Create more contents with the Same Engine

When I see wordpress.com I was wonder how to Create a Dynamic site like this, where multiple users are allowed to create account and each user will be having the same interface just like in wordpress.com. for me mysite.com/username.
I have a idea like if a user is created then i will create a folder with the same username and copy the whole script inside his account.
But i know wordpress is not like this, they have one wordpress engine. How to create like this I mean idea about programming. I know PHP, mysql and HTML. and I have already created a site where a user is allowed to upload image and view it. But i user on different subdomain or different page mapping with the same engine.
Thanks
it's never true that for each user script is copied with folder name same as user-name, until it's small and static site.
Here Every thing is controlled with database and sql queries.
PHP and MySQL are two of the most popular open source server-side technologies used to power dynamic websites.
When you create a normal web page with HTML and CSS, all the content is fixed by the webmaster. Everyone who visits the page sees the same content—it's static.
By contrast, the content of a dynamic web page frequently changes in your case according to users. So the page /folder is same for all users but contents are loaded dynamically.
When the web server receives a request, it hands the page to the PHP engine, which normally runs as a module within the server. Depending on the code and type of request, the PHP engine queries the database if necessary, and then builds the HTML output to send back to the browser.
Refer this links for : creating subdomain according to user names :
https://webmasters.stackexchange.com/questions/14236/subdomains-vs-folders-for-multi-account-users-application
How to create a subdomain with username as subdomain name?

What is the best way to show partner page header on my web site?

I've created a website (Wordpress / PHP) which has a some services. Anyone can use this acccessing my website.
To get more trafic, I will be having partners that can use my services on "their site".
In reality, the page is still on my server but will be using the header (logo, menu etc) from my partners website. This makes it transparent for the normal user (they still think they are on my partners website).
My question is: What is the best way to copy my partners header and display it on my own site?
What I like to do when integrating WordPress blogs into 3rd party sites is
have them serve a top.html and bottom.html file than I can fetch (frequently using a cron job, not on every request using include() though)
Serve any WordPress page so that top.html is on top, then comes my WordPress output, then comes bottom.html.

Wordpress: using a test theme only for a specific user

I'm testing a new template for a wordpress based site, and I'd like to test it directly on the live version instead of making copies. I thought I could create a test user (wordpress is bridged with vbulletin which handles user auth), serve the usual theme to anyone BUT that specific user, who would get the new testing one.
I don't want to install a plugin, I'm looking for the right place to edit to insert this check:
if logged user == test_user_id
serve 'testtheme'
else
serve 'normaltheme'
The userid can be get from $_COOKIE.
I tried hacking the get_template() function in wp-include/theme.php but apparently that was not enough. Any suggestion?
This is the best way to "test" or develop a theme behind the scenes without needing to alter too much of your Wordpress core or make custom changes...
http://digwp.com/2009/12/develop-themes-behind-the-scenes/
Just logging into my old Wordpress.com blog, I see that I can do all the previewing I want from the themes manager already - click around to any page I like, or bring up the frame's URL to see what query string I'd have to append to a URL to get the same preview, e.g.
?preview=1&template=pub/mytheme&stylesheet=pub/mytheme
Any reason that's not enough?
Perhaps you should add a column to your user table, call it "is_beta" and if it's set to 1 then enable beta features/themes. This way you can easily add or remove people from the beta, and when you're beta is ready to launch, you flush the column for everybody and make the features default.

Categories