WordPress 4.4.1 Upgrade

PTR Systems hosts and manages a number of WordPress sites, and they run on a Windows Shared host at GoDaddy.

During the upgrade of one of the sites, the upgrade kept failing. Now as it’s a Windows host, the error message is an Error 500 Server error returned from IIS, not the PHP runtime. So this is pretty useless information.

GoDaddy has the functionality to install and overview your WordPress installations. Thankfully when you visit the overview of the failed installation it shows you error returned from the php runtime, and this information you can use to diagnose your problem!

In my case, the Jetpack plugin was causing the issue, so I simply deleted it from the plugins folder and the site is back up and running, but it states the upgrade has failed, at this point I simply re-installed the upgrade and it worked and then upgraded the remaining plugins.

So, I recommend in the future to make sure all your plugins are up to date, BEFORE you do the 4.4.1 upgrade in case one of your plugins is not fully compatible with 4.4.1. I believe the version of Jetpack I had installed was quite an old version, hence my upgrade issue. Hey, you live and learn!

Please note, the site I was upgrading is not live yet so it didn’t matter that it went down! All my other hosted sites are backed up and these major upgrades are performed on copies of the site then transferred over to reduce downtime, and these upgrades are performed in the early hours of the morning!

Moving to Plesk hosting

Well, it’s been a long journey, but generally trouble free.

As I’ve moved from such an old version, it was still running on .NET 3.5, so the first thing was to create the add the new domain to Plex, which is now ptr.systems and set it to use .NET 3.5 rather than the default .NET 4.5.2.

Now copy everything across! Which took a while, due to the large number of small files, but we got there.

The fun part was the Database, unfortunately, Go Daddy for security reasons will not let you upload a .bak file, which I backed up on the old hosting, so I had to restore it to a local copy of SQL Server 2012 Express, and then Script the database and content and run the script on the new database hosted on the Plex hosting. I did phone support to see if they could easily transfer it their end, but they wouldn’t, but sent me a good help guide to script the database.

Either way, everything copied across, so ran the /Setup and, Error 🙁 So adjusted the Web.config to show Errors and discovered it was an issue with having DotNetAuth.dll in the /bin file, simply deleted it and it worked.

So, next I downloaded the latest version which had both .NET 3.5 and .NET 4, which happened to be 2.4.0.3.

I first uploaded the .NET 3.5 version and ran the /Setup, then I uploaded the .NET 4 version and set the hosting to .NET 4.5.2 and reran the /Setup, just for good measures!

All working fine, so finally uploaded the latest version along with the extra-skins!

New update and e-mail settings

Well, it’s been a while, but every things been working fine and dandy, but e-mail has never been able to send from the site, so I decided to update to the latest version and check my e-mail settings.

Updating to the new version was as simple as ever! First, use Go Daddy’s admin website to backup the MSSQL Database, then FTP the site back to my workstation for a backup. Then download the new version of mojoPortal for .NET 3.5 and unzip it!

Now I opened the user.config.sample file and added all the settings in my user.config file from my backup, plus added the following lines for e-mail support on Go Daddy hosting:

<add key="SMTPServer" value="relay-hosting.secureserver.net" />
<add key="SMTPRequiresAuthentication" value="false" />
<add key="SMTPUseSsl" value="false" />
<add key="SMTPPort" value="25" />
<add key="SMTPUser" value="" />
<add key="SMTPPassword" value="" />

Now save this as user.config and that’s that file done! Open the Web.config file, and here, you’ll notice the medium trust has become default now, not full trust, so you no longer have to do any renaming of files, just change the mailSettings below for mail to work with Go Daddy:

  <system.net>
    <mailSettings>
       <smtp from="noreply@domain.com">
           <network host="relay-hosting.secureserver.net" port="25" />
       </smtp>
    </mailSettings>
  </system.net>

Save the file again, then ftp the new mojoPortal installation over the top of the old installation, then run the /Setup scripts to get the new site up and running!

When you are using the Contact web feature you must change the settings to NOT send at the e-mail address entered and to send from an address @domain.com rather than any gmail or hotmail account, as the Go Daddy SMTP relay server will not relay messages with @gmail.com, @yahoo.com, @hotmail.com, etc… So if you leave that option ticked, you will never receive e-mails from people that enter addresses like that in the From box.

I’m going to be looking at the jQuery used in mojoPortal next and figure out why some themes seem to work great on iPad and some don’t! I’ve also been told there is a problem with the editor on iPad, so I’ll be investigating that next, so if this is also a problem for you, hang tight and I’ll see what I can do!

Multiple Applications on top of mojoPortal

Well, it’s been a while since my last post, but I thought I’d let you know some of the problems I ran into installing DotNetNuke and Joomla on my hosting provider, considering I have mojoPortal as my root site.

GoDaddy has this funky section of Hosted Applications, where you can simply select the application you want and it will install it for you! This includes setting up the database and the application.

So, I decided I would take a look at DotNetNuke and Joomla to compare it with mojoPortal, although I have already made my mind up, that mojoPortal is the best CMS, as it’s fast and very easy to use. Plus it’s written in C#, which is my language of choice, whilst Joomla is written in PHP and DotNetNuke is written in, wait for it… VB.NET, yuk!

So, the first thing I did was set up two net sub domains using the Domain Management tool in GoDaddy, I called them dotnetnuke.ptrsystems.com and joomla.ptrsystems.com and put them in a dotnetnuke and joomla directory, respectively.

I then popped into the Hosted Applications section and installed them into the appropriate sub domains. I shortly got an e-mail telling me they were both set up!

Great, I thought, and it was great for joomla, which worked straight away, especially as this is a PHP website, so doesn’t care much for the Web.config in the root directory! But, DotNetNukewas a different kettle of fish!

To start with, I got a nice Server Error 500! Which, on your own server, you could get a bit more information than just Error 500, but on GoDaddy’s hosting you don’t!

So, how to fix it! Good Question! I had a feeling that the Web.config in the root directory was propagating down to the dotnetnuke directory, therefore the sub application will be trying to find mojoPortal modules which are not in the dotnetnuke application’s directory.

So, I needed to stop this propagation, but how!? Trawling the Internet was proving quite difficult to find, even on the MSDN website, but I finally found a <location> tag option, which stops inheritance to child applications. This is the solution, but when I tried it, it then caused Application Errors, so I moved the <location> and </location> tags to stop inheritance on certain sections of the Web.config file, after lots of trial and error here’s where you need to put it:

...........
      </appSettings>
      <location path="" inheritInChildApplications="false">
            <system.web>
...........
            </system.codedom>
      </location>
      <runtime>
...........

So, basically you need to enclose all the tags in the <location> tag, except for:

  • <configSections>
  • <appSettings>
  • <runtime>

After this was done, both mojoPortal and DotNetNuke work excellent together, and I’m assuming any ASP.NET application I intend to host under mojoPortal will also work!

My next move is moodle! Unfortunately, GoDaddy believe this will only work on a Linux server so their Application Hosting section wont let me install it on my Windows hosting, but where there is a will, there’s a way, so I’ll let you know how that gets on next!

Until then, I’m busy living the last days of my 20s! So might be a while before my next post! Until then, take it easy and I hope this helps anyone that wishes to host applications under a mojoPortalparent site!

Site Upgrade

Well, what would you know, I downloaded and installed the latest “stable release” yesterday, only to find out today, a newer version had been released!

So, what better way to find out how simple it is to upgrade mojoPortal when new releases come out. As mojoPortal is open source, new versions tend to come out quite regularly! Now, I could use the development version of the site, but as this site is live and classed as a production site, it is always wise to use stable releases.

So, to upgrade mojoPortal is quite simple:

  1. Backup the site!
    • This is always a good idea, just in case something goes wrong!
    • Plus always nice to have a copy of the site to check on old settings files, in case they’ve changed, if you use the user.config file to hold your SQL Server connection string you won’t have to worry about re-entering it in during upgrades! But handy to have a backup in case this changes!
  2. Backup the database!
    • This wasn’t a problem with GoDaddy as there is a nice little Backup button on the Database Management tool within there web administration tool.
  3. Download and unzip the new release of mojoPortal.
    • Now if you remember, GoDaddy runs in Medium Trust mode, so I also had to rename Web.config to Web.fulltrust.config and rename Web.mediumtrust.config to web.config!
  4. Goto the website and log in as an administrator!
  5. Use an FTP program like FileZilla to upload all the files to your website, replacing all the existing files.
  6. Goto the websites/Setup address and watch the upgrade occur!
    • If you remember, I set the DisableSetup setting in my user.config, so you must remember to log in to the site before you upgrade, as therefore, as you are an Administrator, it’ll let you run the Setup script!
    • If you forget this, simply edit your user.config or web.config file to set the DisableSetup tag to false!
  7. Job’s done! Go look at the site and notice absolutely no difference!! But there’s normally underlying bug fixes and speed enhancements, plus one nice new update was the calendar tool used when defining the time of something, like this post!

So, overall, I’m quite impressed how easy the whole upgrade process is! It’s just remembering a few points and relaxing while the site uploads via FTP, as that tends to be slow! Happy using the new release of mojoPortal!

This Blog!

So, myself being the geek I am, has decided to write a blog of the construction of this site! Why, don’t ask! But if it is at all interesting to anybody, then they are welcome to read it!

So the creation of this blog was quite easy with mojoPortal! First of all, I need a new page, lets call it “Site Construction”, so go to New Page and create a page with Root being it’s parent page again, so that it appears on the top menu bar!

Once the page is created, again we have a blank page, so Edit the page and firstly add a little bit of Html Content, just to say Hi and all!, but just to be different, I decided to add it to the left Pane! Now with just a page with content on the left, it looks a bit bare! Especially as the text only covers half the page! Nevertheless, I just popped a little bit of blurb in the Html Content and job’s a good’un!

So, now what I need is a Blog! So, let’s go back to Edit This Page and add a Blog Feature to the Center pane. Calling the feature something like Site Construction Blog! Now this just names the Feature not the Blog, so once the feature is added to the page, you need to edit the settings of the blog to name the blog whatever you like and tweak a few settings to make the blog look like what you want it to look like! Plus add copyrights, etc onto the blog! Once you’ve tweaked the settings to your heart’s consent! Save it and you can add your first post on the page! I did this as the Administrator account, hence why the Welcome post is by Administrator.

I thought at this point, it would be an idea to create my own account! This is always a good idea, as if you forget your admin password, it is an absolute ball ache to get your password reset, especially if you are silly enough to leave your e-mail as admin@admin.com!! So I created my Pete Garland user account and posted my first “Up and running” blog!

And, slowly but surely the more blogs you post, the more the site pads out! Which actually looks quite good! Obviously, if you weren’t as boring as me, you could jazz up your posts with a bit of pictures, font’s, etc… But nevertheless, moving one!

So, now that I have my blog, it’s on a different page from the home page, and I’d like to show people the process straight away on the home page. So let’s see how easy it is to do that!

The one thing you’ll notice is the Feeds icons along the side of the blog! There’s one called RSS! Now an RSS feed is just a simple feed for your blog only, and this can be accessed from all kinds of places and programs! Outlook and Mail for Mac can both link to RSS Feeds and tell you when a post has been posted! This is useful and normally done on News websites! Now mojoPortal also allows you to link these feeds to other sites like Google and Yahoo, etc… But you can also use it to link to another page on your website.

To do this, I went to the Home page and Edited it and Added a Feed Manager feature to the page. What’s a Feed Manager? Well, it’s used to link 1 or more feeds to your site! So for example I could have this Under Construction Feed as well as say a New Products feed or a News feed, all on different pages, but I might want to merge all the new posts into one feed. Well you do this with a Feed Manager.

So once you’ve added the Feed Manager to the page, you simply Add a new feed to the Feed manager and use the RSS Feed link! You get this by clicking the RSS button on the Under Construction Page, then copy and paste the URL (the address in the Address bar), into the Feed Manager settings. Now if you are using something like Safari or Chrome, you might notice the URL begins feed://, if it does, get rid of that bit and replace it with http:// then add the feed and jobs a good’un!

Now as I don’t want to overwhelm my customers on the front page, I decided to change the Feed Manager settings to only show an Excerpt of the blog, and limited it to just 250 character, then show … read more!

When you click on the read more or the title of the blog, you will be taken to that specific post on a page all on it’s todd!

So, that about wraps up the blog! I hope you are enjoying reading this blog, if not, well, don’t read it anymore! But I hope it’s both entertaining as well as being educating! So ultimately Edutaining!!

What’s next for the site! Well, let’s take it as it comes! Stay tuned!

Basic Settings, Home and Contact Form!

Well, now that the site is all up and running, time to set some site details and add some basic pages!

Upon a new installation of mojoPortal, you get a default page, with just a little bit of HTML Content telling you how to login! I used that and pretty much straight away went to My Account to change my password and login details! This is after all, now a live site!

So, first we need to call the site, the correct name and enter a few admin details and choose a site design. There are quite a few designs that come with mojoPortal and you can also download tons of free ones too, plus use a bit of software called Artisteer, which I’ll come back to later! The current style of the site is styleshout-coolwater.

Oh Sorry, forgot to mention settings to change your Site name and design is all under Administration at the bottom of the window!

mojoPortal is actually a really simple CMS to use! you have a page, right! Well you can Edit the page, Add a new page, or Edit specific contact on the page! So first things first, let’s edit the Home page to say Under Construction! Obviously on an normal site, it is normally advised not to state under construction, but as I want people to see a site come together, whether they are looking or not, I just popped an Under Construction start page.

To do this, I simply went back to the home page and pressed the Edit button next to Welcome! The page then reloads with a cool little “Word style” box with the page in it, all in it’s glory and now nicely editable! So delete it all! and type whatever you like! In my case “Under Construction!!”. You can format it just like you can in Word, but, I’m boring, so I’m leaving it plain!! When you’ve finished simply go to the Save button at the bottom of the page! Done Job!!

You will now see how easy it is to edit content already on a page with mojoPortal! Fantastic! So, lets add a new page! How about, a Contact page! We’ll make this one a bit more funky!

To add a page to mojoPortal, there’s a big button called New Page at the bottom of the window! Handy, press it and fill in the page name and select it’s Parent! OK, Parent page?! A site works like a tree, were you have a starting root, then pages from that, then pages from those pages and so forth. Basically, as we want the Contact page to be on the top menu of the site, we must make it’s parent “Root” not Home.

Once you’ve created the page, you’ll now have to add Features onto it! Well let’s start off with just a “Html Content”. This feature is just a section of HTML, which is the language websites are written in, on a page! Remember Html Content can contain pictures, movies, videos, everything you can put on a web page and you use that “Word style” box to edit it! But for me, it’s especially useful for just a bit of text, remembering, I’m not very interesting with design, as I’m a geek, not a designer! But moving on! Once you’ve decided you want a “Html Content” on your page, you have to decide where to put it, generally Center is the best place until you add other feeds, etc to the sides!

Once it’s Added, you’ll notice nothing changes other than the name you gave the feature appearing in the Center Pane box below, in my case, “Have your say!”, don’t worry, this is perfectly normal! You now need to View the page to get to the page itself, rather than the settings. Once you have the page up, you’ll see Edit next to your Feature title, click it just like you did the Home page, and edit any text you like!

On a Contact page, you would hope to have a form to let people contact you! Well, mojoPortal has just that, a Contact Form! So go back to Edit This Page and add a Contact Form feature, you’ll notice when you add it, it will appear below the other Html Feature, in my case “Have Your Say!”. Go back to View This Page and Bob’s your uncle! How easy is that!

Well, that’s me done for the moment, little break then create this Blog!

Up and Running!

PTR Systems uses GoDaddy for it’s hosting.

The site was a doddle to upload to the provider, I simply uploaded the mojoPortal zip file to the server using FTP, then within their File Manager on their administration website I unzipped the zip file on their server, therefore not having to worry about uploading thousands of files, as mojoPortal is quite big!

Now that the site had been extracted, I needed to move all the files from wwwroot to the root (html) directory, which was relatively easy using their File Manager, then once all the files were moved, I enabled Writing to the Data, ClientScripts and App_Data directories using their Permissions button!

All set! Apart from the user.config file. I updated the user.config file to set the SQL Server database, then uploaded that to the server.

So, should be as simple as visiting www.ptrsystems.com/Setup and jobs a good’un.

Unfortunately not! Every time you visit the page, you get the custom error page. So, I checked the user.config file, and it’s all fine, so tweaked the web.config file to turn off Friendly Error pages, only to then discover GoDaddy does not allow Full Trust Applications!, so I simply renamed the web.config file on the server to web.fulltrust.config and then renamed web.mediumtrust.config to web.config. This worked!

So the site was now up and running, just one thing left to do! Disable access to the /Setup folder, which you can do quite simply by adding

  <add key="DisableSetup" value="true"/>

to the user.config file. So that just about wraps up the installation!

So other than the Medium Trust issue, everything seemed to go swimmingly!