by antis
10 replies
  • WEB DESIGN
  • |
Hello, my problem is that I placing javascript at the end of my documents, and accidentally deleted some other HTML files. So now I am not able to enter my website at all, it shows some kind of errors. I can't even login to my dashboard, when I type /wp-admin/ after the address (I am using wordpress), it shows the same thing. However, I have all my HTML files saved to my computer, so I only need to copy and paste them. Is there any other way to login to dashboard instead of /wp-admin/ ?
#needed
  • Profile picture of the author Dani78
    maybe you can re-upload the HTML file back with filezilla
    then try again. I understand you deleted them online but
    have them on your computer.
    Signature
    57 FREE Traffic Sources >> Download Here
    {{ DiscussionBoard.errors[9042354].message }}
    • Profile picture of the author antis
      Yes, I have them on my laptop. I also have filezilla but haven't used it yet. I tried to transfer but the transfer was denied
      {{ DiscussionBoard.errors[9042395].message }}
      • Profile picture of the author travlinguy
        Originally Posted by antis View Post

        Yes, I have them on my laptop. I also have filezilla but haven't used it yet. I tried to transfer but the transfer was denied
        Maybe you tried to upload with your Wordpress username and password. Filezilla will be looking for your hosting username and password.
        {{ DiscussionBoard.errors[9042412].message }}
        • Profile picture of the author antis
          I logged in with an FTP account that I created on cpanel, but when I tried to drag the file it said that transfer failed
          {{ DiscussionBoard.errors[9042415].message }}
  • Profile picture of the author Mr Bill
    Originally Posted by antis View Post

    Hello, my problem is that I placing javascript at the end of my documents, and accidentally deleted some other HTML files. So now I am not able to enter my website at all, it shows some kind of errors. I can't even login to my dashboard, when I type /wp-admin/ after the address (I am using wordpress), it shows the same thing. However, I have all my HTML files saved to my computer, so I only need to copy and paste them. Is there any other way to login to dashboard instead of /wp-admin/ ?
    I think we need some clarification before we can help you.

    1) You say "...placing javascript at the end of my documents".

    Why? What documents? I presume these are documents outside your wordpress installation? If so, a simple restoration from your local copies will have you up and running.

    2) You say that you "...accidentally deleted some other HTML files."

    How? if you were able to access files at a sever level access that allows you to delete them you must be using FTP access somewhere, somehow. Are you using File Manager inside cPanel? If so, then your FTP login details are usually the same as your cPanel login details. Login details needed by Filezilla are usually something like this...

    connect to = ftp.yourdomain.com
    username = cPanel username (not wordpress*)
    password = cPanel password (not wordpress*)

    Then it's simply a matter of replacing your broken files with good local copies from your laptop.


    3) This one's a doozy because you're talking about a wordpress site but your "adding JavaScript" and accidentally deleting HTML files tells us that you're not talking about a wordpress site. I can only guess that you're running some sort of hybrid html/wordpress site which is fine and very possible (a wordpress blog might be just one part of your website) but we need clarification on this point to help you.

    If you've deleted (php) files from your wordpress site then you will have to restore them. A copy of the (non wp-content) files and folders from a running and working wordpress site can be used (if you know what you're doing) to get you up and running provided your wp-config.php file still contains proper database connection data). If it doesn't and it was one of the files you deleted then you can get this information from your database applets in cPanel.

    Most of the people on this board who could fix this for you could probably do it in a few minutes but for the sake of educating (or entertaining) the readers of this thread try share some more details with us so we can help you further.

    1) Do you have a full backup of both your HTML site and your wordpress installation files?
    2) Are you using cPanel?
    3) Try your cPanel details to login into your server via Filezilla?
    4) Tell us how many websites you're talking about and explain why you're referring to JavaScript, HTML and wordpress in the same issue.

    * as stated by "travlinguy" above
    {{ DiscussionBoard.errors[9042447].message }}
  • Profile picture of the author antis
    1) yes
    2) yes
    3) I tried, and I successfully logged in
    4) One website. The issue is that I was optimizing my web page, and I wanted to put JavaScript at the end of my documents (these documents were the templates with my html files in the editor section). So when I did that in one of the templates, the website got broke.

    P.S Sorry if I may sound stupid, I am completely new to creating websites so I don't know much about it.
    {{ DiscussionBoard.errors[9042466].message }}
    • Profile picture of the author Mr Bill
      Originally Posted by antis View Post


      1) yes
      2) yes
      3) I tried, and I successfully logged in
      4) One website. The issue is that I was optimizing my web page, and I wanted to put JavaScript at the end of my documents. So when I did that in one of the templates, the website got broke.

      P.S Sorry if I may sound stupid, I am completely new to creating websites so I don't know much about it.
      No one's born with this knowledge. Your question is helping others as well. If this is a critical website you might want to pay someone who knows what they're doing to fix it with or for you. If you're just playing/learning then fixing this error will be a big lesson for you.

      Ok, so it's a full wordpress site. I'm assuming when you said "html pages" you meant "files" and probably php files. If that's the case here's what you need to do...presuming you haven't done too much work since you took the backup because restoring your files will obviously overwrite any changes you made to the physical pages though being wordpress any pages or posts you added will be stored in the database. The files you damaged (and will be replacing) are largely to do with how the site operates and looks.

      Before you start;
      a) download all the files on your server (yes the broken ones and everything) into a new folder. If you overwrite the wrong file they might come in handy later)

      1) Restore all your (known good) files back up to your server. If you know which files you broke only update them. To be safe I try to leave an original on the server with a backup-type name change. For example, if you're overwriting wp-config.php I'd rename the current file to wp-config.php-old which renders it invisible to wordpress but it's still there in case you need it later. Too many times I wished I'd not overwritten a file only to find I had no copy of the file I was overwriting. Only education and experience will teach you which files you can confidentally overwrite. In the meantime, backup is the smart and safe move.

      Once your website is working again do step 2.

      2) Add your JavaScript to the footer.php (inside your theme) or (better still) look for a place in your theme where you can paste code or scripts into your footer. Most themes have one but not all.

      Report back with the results.
      {{ DiscussionBoard.errors[9042487].message }}
  • Profile picture of the author Jeffery
    Question #1. The WordPress website is: remotestartersforcars dot net?
    Question #2. The WordPress theme is: anew.
    Question #3. The WordPress theme was sourced from here: alxmedia dot se/themes/anew/

    Comment: The error in the browser when you visit the website is: Parse error: syntax error, unexpected ':' in /hidden/hidden/public_html/wp-content/themes/anew/option-tree/ot-loader.php on line 660

    Solution.

    1) Delete the theme: anew
    Delete it either through Cpanel File Manager or through a FTP Client.
    The path is: /public_html/remotestartersforcars.net/wp-content/themes/anew/

    2) Reinstall the theme

    Now you should be able to login into WordPress.

    If you cannot login into WordPress let me know in this thread.

    Important: refresh your browser before you try to login into WordPress. Ctrl-F5

    Jeffery 100% :-)
    Signature
    In the minute it took me to write this post.. someone died of Covid 19. RIP.
    {{ DiscussionBoard.errors[9042522].message }}
  • Profile picture of the author Mr Bill
    Wow, knowing the actual URL would have helped a lot. Good work Jeffery!
    {{ DiscussionBoard.errors[9042556].message }}
  • Profile picture of the author sham2
    You can upload your html content with the help of filezila.. If you have full backup of your files.
    Easy way that delete your current themes and upload your new themes with the help of filezila. Hope it will be helpul for you,....
    {{ DiscussionBoard.errors[9044755].message }}

Trending Topics