how to convert PHP to wordpress,

by Giggle
5 replies
hi All:
a business owner has a website with php files and has over 100 posts on the website. i will like the owner to convert to a CMS. Is it possible to convert the php posts to a wordpress website so the owner can add his own posts.

thanks
#convert #php #wordpress
  • Profile picture of the author K Meier
    What exactly do you mean with .php files? Are you just talking about the content of those files, as in the actual post? If so, you would need to do that manually, copy and paste the content of those posts. Writing a script to open up each php file and looking for a footprint just to find the actual content is probably gonna take longer.

    By the way, why would your customer save the content directly in php files and not sql files? Are you sure there are not saved in an sql database?
    {{ DiscussionBoard.errors[5879380].message }}
  • Profile picture of the author Mkj
    Well you could just repost the pages into wordpress. If you need to use the php code itself then there are plugins that allow such in the posts or pages. Wouldn't take that long to carry out. Only thing then would be to let google know that the content of the orignal pages has moved using 301 redirects. This could be done with either htaccess or even using the original pages themselves with additional code added in the header such as this:

    Code:
    <?
        Header( "HTTP/1.1 301 Moved Permanently" ); 
        Header( "Location: http://www.url of new wordpress page here" ); 
    ?>
    Leaving the pages alone and using the above to link to the newly created wordpress pages would probably be an easy to carry out solution.

    Regards
    {{ DiscussionBoard.errors[5879416].message }}
  • Profile picture of the author Giggle
    to be honest i really do not know if the files are stored in an sql database, i do not know anything about programming but it appears that the content can be copied and pasted into wordpress .
    {{ DiscussionBoard.errors[5879476].message }}
    • Profile picture of the author Mkj
      Originally Posted by Giggle View Post

      to be honest i really do not know if the files are stored in an sql database, i do not know anything about programming but it appears that the content can be copied and pasted into wordpress .
      The pages themselves would reside on the server so would be accessible to being edited. The pages would make calls to the database should certain content need to be displayed by doing so but the pages themselves would exist. Messing with htaccess if you don't know much about doing so would be a bad idea especially as it can be a hidden file on some servers. On top of that you would have to add 100 redirects to it. The php header 301 redirects would be fine. Though should the pages need to be removed then htaccess would need to be used. There is a very capable htaccess 301 redirect code maker here:

      Free .htaccess Redirect Generator

      By the way the above is only if the owner of the site is concerned about google indexing. If he isn't then all traffic to the old pages could just send the users to the site index instead. Just one redirect would be needed then. Possibly wordpress would do this automatically - not sure on that point.

      Best way though would be with php header redirects and let google reindex the site for a while before removing them. Personally though I would leave them on the server with the redirects in place so if anyone has book marked a page he would get sent to the correct wordpress page for example. If you don't supply redirects and remove the original pages then all google traffic will die a death...
      {{ DiscussionBoard.errors[5879552].message }}
  • Profile picture of the author Earnie Boyd
    Without eyes on the situation, the process to convert from one to another is at best iffy in trying to give you guidance especially since you yourself aren't technically savvy enough to give us enough detail. The best advice anyone can give you in this case is to hire a professional. PM me if you want more.
    Signature
    {{ DiscussionBoard.errors[5879688].message }}

Trending Topics