Welcome to WebmasterWorld Guest from 100.26.182.28

Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Delete Wordpress completely

but keep my pages using same url

     
7:38 pm on Nov 26, 2016 (gmt 0)

Preferred Member

10+ Year Member Top Contributors Of The Month

joined:Aug 16, 2004
posts: 379
votes: 4


I have part of my site managed using Wordpress. However, for what I do, it'd much easier to simply have standalone pages.

Basically, what I'm looking at doing is replacing all pages / posts with standalone .php pages and then delete Wordpress completely.

Firstly, can I do this? Could I simply copy and paste everything using the same page names etc and same folder structure and then upload once I've deleted Wordpress so all page URLs are the same? Secondly, are there any "risks" SEO-wise in doing this?

The only issue I can think of at present is that the new standalone pages will have ".php" on the end of them so I'd need to find a way of removing that?
7:53 pm on Nov 26, 2016 (gmt 0)

Junior Member from GB 

10+ Year Member Top Contributors Of The Month

joined:Oct 16, 2002
posts: 182
votes: 3


Well you don't need to remove the ".php". PHP files are just HTML files with server-side code added. But they don't have to include any PHP code. So you could just copy the generated HTML code from view source on each page as you say, put that in a file of the same name in the same original folder location, and it will work. Just make sure all the resources are in the same folder locations too (images, style sheets, scripts). The main thing that comes to mind is that of course any dynamic features of WordPress won't work any more (forms, search, other dynamic features), but it sounds like you've already considered that. I would strongly advise doing it all on a development site first and testing thoroughly, and then once it's working just delete the whole WordPress part of the site and replace with your new file structure from the dev site. Take backups of course.

If you were planning to drop the ".php" then it would make the whole exercise pointless, since if you're willing to change the URLs it really doesn't matter how big the change is. Dropping and redirecting to the same URLs without the ".php" is the same for Google as redirecting to a whole new URL scheme. It would be new URLs all the same. But as said above you don't need to change the ".php" anyway, so yes you can do what you want and not change URLs.

One other thought, this is of course assuming that you are using "Search Engine Friendly URLs" and none of your URLs therefore include a query string (the part after a question mark). As long as your URLs all end with ".php" and nothing after then no problem. Otherwise, problem.
8:36 pm on Nov 26, 2016 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4458
votes: 331


Wordpress URLs don't normally end with .php which is why it should be considered. If the site is on Apache it can be done fairly simply and I'm pretty sure it can be done on Windows systems as well.

The biggest concern is that WordPress generates several different ways to find the same content so "pages" have multiple URLs showing the same content. Most people choose the version they want indexed and "no-index" the others even though they get crawled and linked to. I would try to make sure that none of the variations is indexed before setting up the file structure.

No reason that "example.com/category/wonderful-widgets" can't be served with or without WP.
2:02 am on Nov 27, 2016 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 31, 2006
posts:1312
votes: 30


How many pages are we talking about? It surely can be done but depending on how many pages will depend on just how much work it's going to be. I made a switch from a different CMS to static HTML pages and I'm so glad I did it. But I only had 35 pages. I also updated robots.txt to not index the print friendly URLs and unnecessary pages like that.

I kept the URLs exactly the same, I used .htaccess rewrite rules to do that. The actual HTML pages themselves, however, were named 001.php, 002.php, etc. This is going to take time, so my advice is to convert it all manually or on a test server before making the big switch.

I just remembered that I also took down a Wordpress blog off a section of my site one time a few years back. Basically I did the same thing: I kept the URLs the same again using htaccess, no indexed a bunch of URLs in robots.txt and again, I'm so glad I don't have that extra maintenance and security concerns of the CMS. For that case though I had some really low value content pages (very few words) which I just deleted, so I kept 90%+ of the pages that were actually worth keeping.
6:35 pm on Nov 27, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15805
votes: 846


the new standalone pages will have ".php" on the end of them

Pages or URLs? Whether you're using a CMS or rolling your own, the two aren't the same. Just resist the temptation to do the !f test; instead write your htaccess-or-equivalent for specific URLs.
12:42 am on Nov 28, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Just resist the temptation to do the !f test
What's the "!f test?"
1:22 am on Nov 28, 2016 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11821
votes: 236


What's the "!f test?"


lucy24 is referring to file attribute tests.

https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritecond
-f
Is regular file.
Treats the TestString as a pathname and tests whether or not it exists, and is a regular file.


and lucy24 probably meant to type !-f as in:
RewriteCond /some/file/path !-f
1:36 am on Nov 28, 2016 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11821
votes: 236


The only issue I can think of at present is that the new standalone pages will have ".php" on the end of them so I'd need to find a way of removing that?

if the standalone files have the .php suffix you can internally rewrite the external request to the .php file.
it helps if you can create an efficient regular expression to match which external requests require this internal rewrite.
also any external requests for those .php files should be (301) redirected to the canonical url.
2:36 am on Nov 28, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


lucy24 probably meant to type !-f
I assumed that but wondered if there was something else I was missing. Thanks phranque
7:26 pm on Nov 28, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15805
votes: 846


lucy24 probably meant to type !-f

It doesn't matter, because the server has to test -f to establish a result of !-f. That is, the only way to get a result of "it doesn't exist" is to check whether it exists. Here I was thinking of constructs like %{REQUEST_URI}\.php (don't quote me on syntax) where you're saying "If there exists a physical file corresponding to the-requested-URL plus .php extension".

The mere fact that OP is thinking about changing to hand-coded php files strongly suggests that there is not a vast number of pages involved. So you could definitely redirect and rewrite by name. That is, redirect blahblah.php to blahblah, and then rewrite blahblah to blahblah.php.

Oh, and be sure to redirect blahblah/ to blahblah for, again, the specified filenames. (I don't know how search engines handle extensionless names. I do know that if you have urls in the form blahblah/ with final slash, they will request both blahblah and blahblah/index.html, probably on entrapment grounds. So you may as well code for the redirect rather than put your server to the work of generating a 404.)
11:29 pm on Nov 28, 2016 (gmt 0)

Junior Member

joined:Jan 13, 2014
posts:115
votes: 23


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

Should do the trick, But Lucy seems against this type of rewrite, not sure I understand why apart from using server resources that is minimal what other downside is there?
12:29 am on Nov 29, 2016 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11821
votes: 236


It doesn't matter, because the server has to test -f to establish a result of !-f.

i agree it's the same test - i was correcting your typo in your previous post...
1:32 am on Nov 29, 2016 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 31, 2006
posts:1312
votes: 30


Where did the OP go?
2:15 am on Nov 29, 2016 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Where did the OP go?
Busy making those changes :)
2:42 am on Nov 29, 2016 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
posts:4458
votes: 331


I hope the OP is not using the rules 3zero posted here. The idea was never to add php via a rewrite rule, but to remove it. Preferably with a 301 rewrite rather than 302 as would result. The NC flag seems to suggest that the site has unknown case URLs which was not mentioned earlier.
3:02 am on Nov 29, 2016 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11821
votes: 236


I hope the OP is not using the rules 3zero posted here.

agreed.
my hope is that lee_sufc will clarify the problem based on many of the questions asked here and then post the exemplified rules for his ultimate solution.
8:01 am on Nov 29, 2016 (gmt 0)

Preferred Member

10+ Year Member Top Contributors Of The Month

joined:Aug 16, 2004
posts: 379
votes: 4


Apologies for the delay in getting back (been busy working).

I have been reading over your replies daily and deciding on the best course of action shortly.

Thanks everyone to taking the time to provide input.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members