I shouldn’t have messed with function.php. Help!
-
I was trying to figure out how to redirect my domain and like a dummy, I posted some code in the functions. php. I have always been told NOT to do that, but I never had and I was tired, etc. No excuse.
But now I can’t get into the administration panel from anywhere and I know squat about PHP
Help me get back in.
(I even downloaded the newest version of WordPress. Still, no dice. I get an internal server error that SAYS basically that I shouldn’t have screwed with the function! lol
-
You can’t just reupload a fresh copy of functions.php? Can you paste the code in of what you’ve got?
Here is the blog. I can’t see the functions. php because I can’t get into the administration section.
As far as uploading a fresh copy, where would I get it and how do I upload it?
Redownload the files for the theme you’re using from here:
https://rockinthemes.com/rockinblue-web-20-2-column-free-wordpress-theme-released/Once downloaded look through them for the functions.php file.
Then you can download an ftp program like FileZilla https://filezilla-project.org/ that will let you connect to your server where your blog is. Look through the files on your server with this program until you find the location of the functions.php file, then upload your fresh copy.
You can also contact me at jnsitedesign at hotmail.com. I’d be happy to walk you through it if you need help
Thank you so much, Jess. I will send you an email in the morning. I gotta hit the sack, screwed up blog or not. I am exhausted from fooling with this all day. ??
I downloaded the theme again and added it to my FTP and everything is working now EXCEPT the administrative function. I even tried uploading JUST the function and admin files and still, I can’t get in to do anything to the blog.
Also, I contacted yahoo about domain forwarding to the subdomain I created on the same domain but they said that I didn’t have that option in my hosting package. They offered me two ideas for doing it on my own but I don’t find an html file anywhere, only PHP, and fooling with the PHP was what got me into this predicament in the first place! Can someone help me get these things fixed tonight? Man, I sure hope so. I am losing income and readers.
Here are the suggestions they gave me for forwarding.
However, you need not worry about it! I have found few workarounds for
you to forward your domain to some other service provider or website.Workaround I. Using HTML/JAVASCRIPT code for domain transfer:
=============================================================This option is useful when you wish to transfer you domain requests to
some other website on a temporary basis. Here are the details which you
may wish to follow.* Using JavaScript code:
————————Add the following code in the “<HEAD>” section of your “index.html”
page:<script>top.location.href=”https://metrikaphoenix.com/”</script>
Replace the value for the attribute “top.location.href” to the website
where you wish to forward your domain to.* Using HTML code:
——————The HTML code below shows how to use an HTML <META> tag in the header to
redirect to another page. The <META> tag goes in the <HEAD> section of
your HTML document. The <META> tag on this page looks like:<META HTTP-EQUIV=”Refresh” CONTENT=”5; URL=”https://clearwire.com/”>
The “5” means to wait 5 seconds before redirecting. The
“html-redirect.html” after “url=” is the URL of the page to which to
redirect.You can save the above code in an “index.html” file in the root
directory.I can’t get into the theme if that’s what they are talking about. Or are they talking about my control panel in my hosting account?
I feel like I am close to getting this done, just need some instruction .
Ok so you managed to connect to your files in the server with an ftp program right? So download your “header.php” file, open it with something like Notepad, and paste that code they gave you near the top of the code. You’ll see <head> several lines of stuff inside here </head>
Put the code inside those head tags. Then save the file and re-upload it.
Do you have three main files, called “wp-admin” “wp-content” “wp-includes” ? They come with the main download of WordPress. You might need to reupload the whole wp-admin folder. But verify that with someone else on here first just in case.
Hi Jess, I forgot to add, well, actually I forgot until I read your reply, that I tried both things they told me on another blog of mine on the same server and neither one forwarded the blog to the subdomain address. In fact, nothing happened at all. I did it like you said, after the head tag and before the close head tag. Now I remember that’s why I was asking if they were telling me to do it in the theme editor of the actual blog or to do it in my Yahoo Small Business Control Panel. But the deal is, I could find no HTML file like they mentioned, only PHP. (Now I am really getting confused.
As far as the second problem, not being able to get into the blog, I thought I DID re-upload the administrative folder in the FTP.
Ugh.
I believe you would do it inside the header.php file. Because your site is php, the index.html is instead called index.php. But the first thing it does is pull in the header.php page, and that’s where are the beginning parts of your website are, including the <head> sections.
Seriously, they won’t redirect it for you? Most decent hosting companies usually allow that, and let you control it through the control panel.
I will work with the blog and see if I can get into it.
The reason I need to redirect my blogs on that domain name to a subdomain is that I have five of them with the same address, but they are numbered blog1, 2, 3, etc.
I do paid posting and this makes it look to the ranking tool that scans my blogs like they are duplicates. I reversed the addresses to have the blog1, 2, 3 etc at the beginning of the URL address instead of the end, which PPP approved and I will now get ranked.
BUT, here is the rub. When I write a post and publish it, the permalink comes back as the old address with the blog number at the end. So I won’t get the posts approved.
That is why I need to redirect the whole website, not just the home page.
In my Yahoo control panel there are no html files except for the file called “read.html” So I tried a link in the sidebar of the control panel that said, “Html Editor” I put that code Yahoo gave me in there, but it didn’t do anything.
My control panel is public, by the way, so I hope someone can help me figure this all out.
Ok, if you connect to your server with the ftp program at the root of everything there should be a file called htaccess. You should be able to set up a redirect in that file.
Here’s a quick tutorial I found on it:
https://www.matthewbredel.com/166/htaccess-and-redirects-for-dummies.htmlThanks, Jess. You are great.
I will see if I can get it going.
I uploaded just the functions file of the theme to the FTP, replaced the functions file that was there, and still can’t get in to the administration section
HELP! There has GOT to be a way.
Can I get some help here? I really am stumped. I can learn to do the redirect myself so forget about that. I just need someone to tell me how to get back into the administration section of my blog. The URL is https://internetmarketingreview.org/blog2. Everything looks fine to the readers but I can’t write, edit, etc. If you read this whole thread you will see that I have tried everything I and Jess could think of over a two day period.
- The topic ‘I shouldn’t have messed with function.php. Help!’ is closed to new replies.