Brackets Live Preview not working after moving to wwwroot - php

I'm using Brackets to dev a static, simple site. The Live Preview capability is fantastic. all was going well until...
I wanted to start using some php in my site so i downloaded php and tested it in my inetpub/wwwroot. I then figured that i best move my static site (html and css files) to the wwwroot folder.
This caused a set of issues i partly resolved. My Live preview started asking for base URL so i put the new local url: http://localhost/myprojectfolder/. HTML and PHP files now showing but...
The Live preview needs me to hit save and restart the preview (defeats the purpose of Live Preview). It also doesn't highlight sections of the page as you scroll through the code.
How can i get PHP working on my site and the Live Preview working, i've messed something up.
Edit: Im using IIS with my PHP hence moving my static site to wwwroot

Brackets has a known issue whereby the Live Preview requires saving of code and refreshing of live preview chrome screen in order to see change. You can also not see the element highlighting once moving to your own web server eg iis.

Related

Wordpress - slashes disappear after uploading project to a server

I'm making this website on WP, working with a theme called Ave.
Everything works fine on localhost (using MAMP on Mac), but after I upload it to a web server (to set up a dev) some of the Ave's core plugin slashes disappear, console looks like that:
Link example: domain.com/wp-contentpluginsave-coreextensionsredux-repeaterrepeaterfield_repeater.css?ver=1552814064
You can see that there are no slashes in this link, therefore the redux options panel doesn't work properly (I can't save anything or so).
Do you guys have any idea what might be the reason?
I can add that I've already tried a clean theme's installation made directly on the server (the same result/doesn't work) and also migrated from one localhost to another (two Macs) and it works properly on both.
EDIT: I also found a place where these particular files are taken from.

How do I change a wordpress dev site url that was overwritten by live site backup

We have a dev site www.dev.site.co.za & a live site www.site.co.za.
I wanted the dev site updated to be a current replica of the live site, so our hosting provider copied it over.
But now when if you go to www.dev.site.co.za, you are "redirected" to www.site.co.za. I have tried changing the siteurl in phpmyadmin but that hasn't resolved the issue.
Is there somewhere else the url needs to corrected and is there anything else I need to do to make sure the dev site is a completely separate environment to the live site so I can safely fiddle without damaging the live site?
wordpress not only uses the database in PHPMyAdmin for the url.
As mentioned in the official documentation there are several files that can include the url:
the wp-config.php (wordpress file)
the functions.php (theme file)
Check these and have a look for the url address.
Have a look at the .htaccess file!
Also:
Helpful for that issue (e.g. restoring a wordpress page on another server) is the plugin BackupBuddy. It is one of the most well known plugins for wordpress. (Know right now that it is a paid version! But as always there are others with the functionality).
It allows you to backup and restore your page on a new system. You can initially set your new desired address for the system then.
Maybe it is worth a look!
For rectifying your dev site issue, you can try this.
Following is the URL to a simple utility via which you can replace some value in your database with some desired value.
https://github.com/interconnectit/Search-Replace-DB
Download the utility (zip file).
Upload it to your dev site root location and unzip it there. So that the the URL of the unzipped folder becomes: www.dev.site.co.za/Search-Replace-DB-master/.
Visiting that URL will show you the screen with options to replace some values in your database with desired values.
This utility automatically selected the connected database.
Put the URL of your live site in the field to replace.
Put the URL of your dev site in the field to replace with.
Choose the Dry Run option to see what all tables and columns will be affected.
Once you see the results and know what is changing then you the click on Live Run.
Clicking on Live Run will change all the URL of your live site in dev site database with URL of your dev site.
Once the changes are done you can delete this folder.
Hope this will at least resolve the problem of redirection of dev site to live site.
Once the new site is built you can then migrate(move, copy) it to the live site's location. There are some tools out there to help with moving the site you can use once the site is done. Some require a plugin to be installed to do that though. For example magicmigration can be used to move the completed site to a new location (that one specifically doesn't take extra installs). It is also possible to manually migrate the site though depending on the situation and know-how that can be a bit much for some people.

Web preview from backend VS ordinary link

I have this problem that my website is good looking when I preview it from Wordpress backend and has no errors. You can check it here - Clean version However when I preview it by simply typing my website address into the bar, it is a little mess. Kindly check it here - Crappy version
I tried clearing the cache, updating the browser, tried few different browsers but no luck. One another weird thing is that on my colleage's computer the website shows perfectly.

Brackets php live view

I recently switched over to brackets as my main coding platform. I am creating a live chat room with a login page using php. Is there any way to set up a live view for php in brackets the same way html is set up? I have the sql and everything already done. Thanks.
Make sure your own local server is already running. Then, go to File -> Settings, and then enter the URL that corresponds to the root folder of your project.
Take a look at the details and limitations of using live preview with your own backend.

Javascript working on one host but not the other

I have recently uploaded a site I'm working on to a clients server. Unfortunately they are only running PHP 4.3, so a few things aren't working but some of my Javascript isn't working which is strange. Can anyone give me any insight into this? Here is the site that is functioning (PHP5+): http://involutionstudios.net/earthrover
And here is the site that isn't:
http://earthtest.monpjc.com/ (PHP 4.3)
As you will be able to see once you compare the two site the Javascript for the centre console isn't working correctly and the images are failing to display.
There is no errors using F12 on Chrome, from F12 I can also see that the images are loading, so it's not a problem with incorrect directory paths.
The Twitter feed not loading isn't the problem as that's to do with PHP.
Any help would be great :)
Thanks
The images are loaded on second, but they are not visible because you are missing twitter div there, putting even empty <div id="twitter"></div> before slider will shift slider div to correct place as it does on first site

Categories